Troubles with accents

Hello,
I setup zenphoto but I have some troubles with accentuated folders.
For exemple I have a folder named "télé" on my hard drive but it is displaying "télé" in zenphoto.
In mysql, the folder is writed "télé".

In my php.ini I have mbstring.internal_encoding = utf-8, mysql is utf-8, my operating system (ubuntu) is utf-8 and I am using zenphoto 1.2.5.

Thanks.

Sorry for spelling, I am not English. if you want to correct me, please.

Comments

  • Were there any warnings displayed by the setup program? What is the setting of the gallery `charset`?

    Have you tried setting the `UTF8 image URIs` option?
  • Warning are about "Strict Permissions", ".htaccess file (is empty or does not exist)" and Zenphoto core files (Some files are missing or their filemtimes seem out of variance). Nothing about utf-8.

    The gallery charset is utf-8. When I allows UTF8 image URIs it is worse beacause I don't see images in accentuate folders.
  • Did you check the file warnings? Maybe you have got some old files present. Can you provide us a link to your site?
  • It is the first time I setup zenphoto, so I haven't old files.

    Do you have this problem when you rename a folder with an accent ?
    The problem is present with ubuntu and mandriva on my computers in version 1.2.5 and nightly build (2009-07-31).

    My site is not yet online, but if you don't find a solution I provide you a link.
  • There is a define at the beginning of functions-basci.php named `FILESYSTEM_CHARSET`. Please try changing it from `ISO-8859-1` to `UTF-8`.
  • I have changed FILESYSTEM_CHARSET to UTF-8 in FILESYSTEM_CHARSET and it is good and no problem with accents.

    Thanks you very much.

    Why FILESYSTEM_CHARSET is ISO-8859-1 ? All moderns GNU/Linux distributions are UTF-8 (including file system). However Windows is ISO so Zenphoto sould suggest a menu to setup this value (FILESYSTEM_CHARSET).

    Thanks you very much again.
  • Actually, very few systems use UTF-8. So far of Zenphoto users, I have heard of only one other than you. Most systems are using ISO-8859-1. Thus we would get multitudes of issues like yours if the setting were reversed.

    We have not made a menu of this since it seems so rare.
  • I let me put there because my problem might also be very rare.

    I've got my own server (xampp), on my local network running Zenphoto, it's on a french WINDOWS version, the client (firefox) is also a french computer because only local network.

    With 1.2.8
    I managed to make it work if the name of the picture is 'télé.jpg' for example by checking the Utf8 URI option in zenphoto administration.
    but if the name of the picture was abcd.jpg inside an album(so a folder) called "télé", I could see the list of the picture but there is troubles.

    I modify this line in full-image.php to make it work but I do'nt know exactly why I should remove the 8 on album and not on image

    [code]header('Location: '.getAlbumFolder(FULLWEBPATH).pathurlencode(imgSrcURI($album8.'/'.$image8)), true, 301)[/code]

    INTO

    [code]header('Location: '.getAlbumFolder(FULLWEBPATH).pathurlencode(imgSrcURI($album.'/'.$image8)), true, 301)[/code]
  • I've got just now 1 problem remaining...

    imagine 1 folder "Essai" with inside a picture of 300x200 named "300.jpg"
    and another image of 2000x1500 named "2000.jpg"

    everything work fine, both the thumbnail and the resize at 595 pixels.

    imagine now the 2 same picture in a folder named "Accentué", so in this configuration the 2000.jpg work fine but the resize at 595 pixels of the 300.jpg show only a link to the original

    ----

    I've also notice that the cache folder contain 2 entry each time it is with an accent.
    in the example we will have a folder named "Accentué" which will contains the correct thumbs, and another named "Accentu" which is empty.

    Thanks for your job, I hope I'm quite clear.

  • I've also notice that the cache folder contain 2 entry each time it is with an accent.
    in the example we will have a folder named "Accentué" which will contains the correct thumbs, and another named "Accentu" which is empty

    This is caused by a bug in one of the Lib-GD functions. (If I remember correctly.) It does not handle folders with accented characters in them but rather strips these characters out of the name and then creates (if needed) the folder with the wrong name.

    We have worked around this problem by pre-creating the folder of the correct name (including accent) but nothing can be done about the incorrect name. Still, it seems not to be an issue.

    From the "fix" you have made it would appear that the filesystem has mixed character set. The folders are in ansi and the files in UTF-8. That will certainly create problems. My suggestion is that you avoid accented characters in the file/folder names. Just use them in your descriptions.
  • It's impossible in my case to avoid use of accent characters. So I do my best for working with zenphoto because in local network usage it's the easiest one I found. I used to work with coppermine since a while but this one is better for my usage.

    In searching solution I've notice that the issue on image where there is no need of resize (300 px to display in 595) ie my 300.jpg picture in "Accentué" folder, there is no issue at all if I check watermark option.
    So I think it's just a bug where no process is require, it don't manage good the utf8

    Thanks a lot and I manage to modify myself the php, so I post my idea and works to help you as you help me a lot by doing this gallery.
  • Can't be impossible to avoid the accents. There really is no good reason even to have them on files and folders. In fact, it is generally recommended against.

    I do notice that the code has changed in full-image.php for the line you have changed. You might wish to try the nightly build to see if perhaps this problem is fixed.
  • (I'm still on 1.2.8, may be I will try a nighty build this week)

    I notice that if the file contain dot it don't generate the thumbnail.

    exemple : "abc...def.jpg"

    as for accent it's quite difficult to remove use because I use this symbol when some data are unknown because ??? is already forbidden by filesystem

    but I understand that my case might be very rare but it's if someone has the same problem, he can feel him not alone ;)
  • You still do not need these characters in the file/folder names. You can place your indication of missing information in the metadata instead.
  • Like accents, superfluous periods are not recommended in filenames. Zenphoto generally will eliminate these as they can cause security issues. I suggest you adopt some discipline with your file/folder names and use only generally accepted forms. Otherwise you are just asking for trouble.
Sign In or Register to comment.