Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
wonga
Experienced
Topic Author
Posts: 32
Joined: 18 May 2007, 14:11

Umlauts in IPTC data

02 Jul 2012, 15:19

Hi there. First of all congrats to the new version. It's awesome what you guys do.

Still - I do have issues with my IPTC data that contain umlauts such as ä,é,è,ü, ö and many more. I had a look at the code and you might want to look in following part in ivMapperXmlFile.class.php:
Code
					if (!empty($title)) {
						$record->title = stripNonUtf8Chars($title);
					}
I have changed the 5 section according to following
Code
					if (!empty($title)) {
						$record->title = mb_convert_encoding($title, "UTF-8", mb_detect_encoding($title, "UTF-8, ISO-8859-1", true));  //solves issues with different special characters
					}
This change actually corrects the missing umlauts that otherwise get deleted from the title and descriptions.
Check live here: http://www.hirst.ch/#/test/exif/german.jpg

Maybe you can check and fix this in a following release?

Thanks and regards
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: Umlauts in IPTC data

03 Jul 2012, 10:19

I believe the correct way to solve this would be to store date in UTF-8 encoding. I believe there should be an option is a program you use. UTF-8 was meant to put this madness to an end. Interesting to mention that your other examples like arabic or greek seem to be in UTF-8.

You used ISO-8859-1 (Latin-1) Charset in your code, but for somebody else who uses Windows-1251 Charset the russian letters will be incorrectly mapped to umlauts.
firedev.com
 
User avatar
wonga
Experienced
Topic Author
Posts: 32
Joined: 18 May 2007, 14:11

Umlauts in IPTC data

04 Jul 2012, 01:18

You are right. I have re-writen data back to the images using Lightroom 4 and it worked just fine. So I suppose LR is using UTF8.
Steve
http://www.hirst.ch