International characters in folder names

Hello all,

Not sure wether this is a bug or not.

My photos are stored and manually arranged in a folder and I have ZP read through it to get its structure.

The point is, as I am french, some of these folders have accentuated characters. And these characters are somehow badly handled by ZP.

I have an UTF filesystem (I checked the folders with convmv) and my SQL DB & tables interclassement is UTF8. Zenphoto internal charset is set to UTF8 as well.

Here's what I have noticed:
- a folder named "2005.04 Crête" is stored as "2005.04 Crête" in the database, and displayed as such in the gallery
- in the Cache folder, 2 folders are created, one named properly (and where the thumbnails are stored) and one named "2005.04 Cr?" which is and remains empty
- I had to turn off the "UTF8 Image URIs" parameter, otherwise the thumbnails of the pictures stored in those folders wouldn't show

I unfortunately have no logs to show you - ZP doesn't come with any error. I am using the SVN version 5486.

Thanks!

Comments

  • acrylian Administrator, Developer
    Are you sure your server supports "special chars" in file and folder names at all? I am German and virtually no host over here "likes" our "umlauts" and especially not accentuated chars...

    If you upload via the backend it will strip those characters for seo.
  • Gurney Member
    Well, I am hosting my own webserver (Ubuntu 9.10) and I have no problems with accentuated characters in my filesystem (it uses UTF8).

    And I don't use the backend to upload. ZP just reads through my folder and update its structure accordingly.

    MfG
  • acrylian Administrator, Developer
    Well, this encoding stuff is quite complicated as there are lots of places where it could be set worng (PHP, MySQL, Server etc). My collegue sbillard is the actual expert on this so you will have to wait a little until he respondes later.
  • There is a define at the head of functions.php for `FILESYSTEM_CHARSET". If your filesystem really uses UTF8 you will have to change this define.
  • Gurney Member
    Thanks!

    The define was actually in functions-basic.php and I had to put UTF-8.

    But it definitely did the trick.

    I think it should be configurable from the interface though. Should I open a trac request?

    Cheers
  • acrylian Administrator, Developer
    Sure.
  • Gurney Member
    Ticket #1522 is opened about this topic:
    http://www.zenphoto.org/trac/ticket/1522
  • Hi,

    Just like OP I don't add files using the backend to upload and just let ZP reads through my folder and update its structure accordingly (I really like that feature:)

    However, ZP is running on a Windows 2003 machine. Folder/file names include Nordic characters.

    During setup it's possible to select between many different server file system character sets, I've tried ISO-8859-1, UTF-8 and Windows-1252, but folders/files with Nordic characters aren’t working.

    Does anyone know which server file system character set that works with Nordic characters in folder/files names running on Windows 2003?

    Since setup asks for server file system character set, do I still need to do any other changes, like the "FILESYSTEM_CHARSET" define?

    Thanks!
  • There still may be an issue of determining the character set of your server. There is a technique in the nightly builds that may help there.

    Short is that if the FILESYSTEN_CHARSET define does not match what the file system actually uses, all those characters with diacritical marks will not work.
  • Thanks for fast reply!

    I've tried zenphoto-2010-11-07-trunk and for ISO‑8859‑1 and WINDOWS‑1252 the test doesn't report any errors. Using UTF-8 or UNICODE the test report "...seems wrong".

    So for Windows 2003 should I use ISO‑8859‑1 or WINDOWS‑1252? Or it doesn't matter?

    Pictures aren't displayed though, but I noticed the following.

    I have an album "Ã¥" (WINDOWS-1252 "E5") and a picture "test.jpg". in that folder. The http path in the browser is displayed as "http://.../Ã¥/test.jpg", but no picture, only empty frame.

    If I click the empty frame to get the full picture, the http path changes to "" and the error message "You don't have permission to access /albums/Ã¥/test.jpg on this server." is shown.

    Changing the http path manually to "http://.../albums/Ã¥/test.jpg" the picture is displayed.

    So, any advice how to sort that? mod_rewrite?

    Appreciate any help!
  • You may need to set the `UTF8 image URIs` option as well as set the filesystem character set to ISO-8859-1.
  • Enabling UTF8 image URIs fixed the issue.

    Thanks:)
Sign In or Register to comment.