PDA

View Full Version : UTF-8 and EE?


Tini72
29th of February 2008 (Fri), 13:11
I would like to use UTF-8 encoding for EE2. Is this possible and what do I have to mind to get it working? Is it enough to set the settings to utf-8 or do I have to save all language files as UTF-8 and change the database? Has somebody set EE successfully set to utf-8?

Pekka
2nd of March 2008 (Sun), 10:37
I have not tried UTF-8.

You will need to set table character set and collate to utf-8 in addition to EE template charset. See http://gentoo-wiki.com/TIP_Convert_latin1_to_UTF-8_in_MySQL
and
http://www.v-nessa.net/2007/12/06/convert-database-to-utf-8

Backup first before experimenting!

MMCM
4th of March 2008 (Tue), 04:09
Hi Tini, I'm running UTF-8 since EE 1.5RC4, and it's working fine :-)

I wrote a few remarks here: http://photography-on-the.net/forum/showthread.php?t=302293

If you have questions, please mail me, as I'm visiting this forum not very frequently.

Tini72
4th of March 2008 (Tue), 09:08
Hi Tini, I'm running UTF-8 since EE 1.5RC4, and it's working fine :-)

I wrote a few remarks here: http://photography-on-the.net/forum/showthread.php?t=302293

If you have questions, please mail me, as I'm visiting this forum not very frequently.

Thanks a lot. First I am going to do a copy af my current database that I can switch back to the old charset if necessary.

I am bit concerned about the IPTC data since IPTC is stored as ISO 8859-1. I am using IMatch für offline photo administration and categorizing and IPTC editing. Imatch stores the IPTC datas as XMP as well. So I am wondering which data EE uses for keyowrds, location etc. when uploading a photo: IPTC or XMP?

Pekka
4th of March 2008 (Tue), 13:40
Usually it tries if there is something in XMP first, if not then it sees IPTC. You can disable IPTC but not XMP detection.

Those are handled in admin files starting with PHOTODATA_ , PHOTODATA_datahandler.php has the variable finalizing code (a bit messy I know).

Tini72
6th of March 2008 (Thu), 03:36
Well, it doesn't seem to be at easy as I thought first. I managed converting the database to utf-8 as well as the language files.

But there seems to be a problem with XMP/IPTC data which is displayed correctly in photoshop. But when uploading a photo to EE all the keywords, titles, photographers name, description text with Umlaut look a bit strange. The strange thing is even when I force the charset back to ISO-8859-1 it is not displayed correctly.

In Utf-8 the word "schlösser" is displayed as "schl�sser"
when forced back to ISO-8859-1 (via browser interface) the word "schlösser" is displayed as "schl�sser,"


If I modify or insert any Umlaut via the EE backoffice it is displayed correctly when using the utf-8 charset.

I wonder if the XMP data is really used when uploading the photos. Is there a way to check if the XMP data of the photo is read at all?

Is there a possibily to convert the IPTC data to utf-8 when uploading?