EnglishI try to keep remote files(on server) synchronize with local files(on pc). But i manage local photos by directory name(as album name) and filename(photo's description) in non-western, local-language-based way.
So you know that, some improvement of core features is devoutly to be wished.
* Support unicode(non west characters) in pathname and filename of data in "galleries" folder.
* and keep the original filename uploaded (contain nonascii characters)
This will bring great benefit to all non-English users,and, it also makes ftp/remote batch photo files management more logical and easier.
Last edited by hwang00 (2012-01-15 06:13:42)
Offline
I totally agree with this! The gallery seems to have most features I have been looking for, but by not supporting UTF-8 or international characters - it's a show stopper.
Thanks,
~Mike
I have gone so far as to try and manually update the code (using 2.4 RC3) and identify where the problems are, to allow UTF-8 characters in filenames and directories when doing a 'Local Sync'.
But it's driving me nuts! There must be some character conversion going on 'behind the scenes', that doesn't allow for UTF-8. I roughly know where the problem lies, but I just can't find a solution. If someone is willing to give a hand, I'll gladly find time to revise the php code. Once finished, I'll supply it to the original developers.
I am working on the Local Sync stuff, and am editing i.php.
- First I added "$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.åäöÅÄÖ ]+$/';" to the config.inc.php in /local/config/ (Yes, Swedish is my native language...)
- Secondly, I have added a urldecode in i.php:
Line 199: changed from '$req = ltrim($req, '/');' to '$req = urldecode(ltrim($req, '/'));
BUT - the query starting on line 449, does NEVER match if $page['src_location'] contains a UTF-8 encoded string. All ASCII characters including space works, but as soon as öäåÖÄÅ are in it - it fails and retruns nothing.
The really strange part is that when I print the value of $page['src_location'] as a HEX string (using error_log and printing to a file), and compare it with the actual field contents (running a manual mysql query) - they are identical!
When the query is run through php/piwigo - no match. Manually with mysql - it matches.
If someone could tell me what the difference is - I'd be able to proceed with the 'Internationalization' of Piwigo.
Running on a Linux host, 3.3.7-1.fc16.i686, PHP 5.3.13, UTF-8 all over, Apache/2.2.22.
Many Thanks for any pointers!
~Mike
Offline
Jumping Jee-bees! I made it work! :-)
Dont ask me why, but I added the php function:
pwg_db_check_charset();
before this line:
if ( ($row=pwg_db_fetch_assoc(pwg_query($query))) )
in the file i.php.
And then it just worked! In addition to the previously posted urldecode.
Plus I modified DB_COLLATE to contain 'utf8_general_ci' (default it is blank).
~Mike
Offline
thx a lot I think it will be in 2.4.1
Could you open a entry in our bugtracker ? thx again http://piwigo.org/bugs/main_page.php
Offline