Problem with French names in imported photos

I used the bulk upload feature of Zenphoto to import an album of photos for testing purposes. Unfortunately all non-Anglo-Saxon letters in the photo names disappeared. Thus Sébastien became Sbastien. I would of course like to keep those letters. Help!

Comments

  • What program are you using to put MetaData to the files.
    What platform are you on PC or Mac
    What charset have you assigned in IPTC encoding: under Options/Image in the admin of ZenPhoto.
  • My problem is not with the metadata, but the names of the photos. Somewhere between my PC and the MySQL database underneath Zenphoto, the French characters in the image names have been dropped. Thus, a photo named Brach-Saint-Sébastien.jpg became Brach-Saint-Sbastien.jpg

    Harvey

    PS: To answer your questions: The metadata was inserted by Photoshop Elements 6, I'm on a PC, and Zenphoto's IPTC encoding is set to Western European (ISO).
  • I just discovered this http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#28 on the Troubleshooting page. It addresses my issue.

    While I'm here, I'll ask another question: how do I tell Zenphoto I want to use French instead of English? (I'm running Zenphoto at DreamHost.) I've looked for a setting in the Admin Toolbox without success.

    Harvey
  • acrylian Administrator, Developer
    The language switch option is on the options.

    Note also that the title you see on the gallery is independed from the actual filename! An image named "image.jpg" may have the title "text". Same for album (folder) names and titles.
  • That was embarrassing. I had seen "HTTP Accept Language" and not noticed it was a pull-down menu. With French selected, everything's in French. Thanks.

    Back to my original problem with French characters: I've used phpMyAdmin to put the é back into Brach-Saint-Sbastien.jpg in the Title field. It displays correctly there, even after reloading the page, and I notice that the Title field is encoded utf8_unicode_ci. However, the Default theme displays the updated title as Brach-Saint-S�bastien. Help!
  • acrylian Administrator, Developer
    You don't need to change the title via phpmyadmin, you can do that on the backend. As said before the title and the filename are independend.
  • I know. However, I'm investigating loading thousands of photos into Zenphoto. For so many photos, I don't have the time to update each photo by hand; I need to automate as much of the loading process as I can. I'll have 540 albums with approximately 1,200 subalbums, scattered across the albums (varying from one to over a 100 subalbums), and an average of 30 to 40 photos per album (varying from 5 to over 100 photos). A number of the albums and subalbum names, photo names and photo descriptions will contain French letters.

    When I input French letters directly into Zenphoto they rest; however, I used phpMyAdmin for inputting French letters as a surrogate for importing data directly into the Zenphoto database via PHP.

    Harvey
  • acrylian Administrator, Developer
    I understand but a good rule to follow is generally not to use accents and other special characters in file/foldernames. To get these displayed correctly a lot of encoding settings need to be set. (I know about what I speak I am German).

    Btw, setup recommends to have the mbstring PHP package on your server. Did you check that?
  • German, eh? As bad as French for non-Anglo-Saxon characters. [sympathetic smile]

    Since this issue is potentially a showstopper, I want to be sure I understand what you're telling me.

    My plan has been to have a folder/album for each commune in the Gironde where I live with a subfolder/subfolder for each church, chapel or other place of worship in the commune and in the subalbum/subfolder would be the set of photos of the church. Since an albums/subalbums/folders' name can differ from its title, I was planning to restrict the names to English characters and assign French titles to the albums/subalbums/folders. By doing so, I believe I will be following your advice "not to use accents and other special characters in file/foldernames". Do you think the name/title distinction in Zenphoto allows me to show correct French titles on the screen?

    Harvey
  • acrylian Administrator, Developer
    As said both titles and file/folder names are independend. The latter is what you see in the url. You only see it on the site itself ifyou have no specific title. Besides if you don'T upload via FTP the zenphoto upload generally uses the SEO filter to strip special characters from file/folder names.

    If the display itself works is dependend on the right (same) encoding everywhere like database tables and fields (can differ!), theme files encoding (how they are saved), charset encoding and if you use EXIF data there, too (as has been pointed out). UTF-8 best as it covers everything. Also it is really recommended to have the mbstring extension on your server (noted on our installation page). Ask your host about that.

    Generally I really suggest to do a test run with an example album to be sure how it works on your server befoer starting such large projects. We can't know about all possible configurations.
  • [Generally I really suggest to do a test run with an example album to be sure how it works on your server befoer starting such large projects. We can't know about all possible configurations.]

    Excellent advice and, in fact, what I am doing. Debugging the transmission of data (making sure character sets are preserved at every step) is a separate problem from being sure that once correct data gets into the Zenphoto database, it will be displayed correctly. From your responses and my testing, it looks like French will be displayed properly.

    So, any problem I have with preserving French characters during uploading of data is elsewhere than in Zenphoto. And I confess I don't know whether DreamHost includes mbstring in its standard configuration of PHP; I'll investigate. As you point out, it's a necessary condition of using the utf8 character set successfully.

    Thanks for your attention to my questions,
    Harvey
  • Occasionally a file system will not be the normal ASCII character set. If this is the case, then Zenphoto will not properly import the accented characters when it discovers the files. (One of the reasons that acrylian recommends not using accented characters in file names.) If this is the case on your server you will need to change the define that specifies the filesystem character set.
Sign In or Register to comment.