bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnu-libiconv] Why iconv is locale dependent?


From: tomas
Subject: Re: [bug-gnu-libiconv] Why iconv is locale dependent?
Date: Mon, 02 Jan 2017 17:51:54 -0200
User-agent: Roundcube Webmail/1.0.2

Hi Bruno

Thanks for your quick answer!

I am writing you because I couldn't understand why iconv (and libiconv
also, I suppose) is locale-dependent.

Short answer: Because different cultures have different conventions.

For example, Gorbatchov (English) is Gorbatschow (in German) or
Gorbatchev (in French).
Correct me if I am wrong: you are saying that "Горбачёв" will be converted from UTF-8 to ASCII/TRANSLIT in different ways according to the above "cultures"? Thus, if my system uses en_US.UTF-8 the result would be different from a system that uses fr.UTF-8.

I thought that by simply determining the destination encoding this "culture" would be also determined...

In glibc, you find the transliteration rules per locale in
https://sourceware.org/git/?p=glibc.git;a=tree;f=localedata/locales

libiconv, on the other hand, is simpler: it does not have locale-
dependent transliteration. This is more a misfeature than a feature.
I am using libiconv (through lua-iconv) and I was experimenting the transliteration problem mentioned in the original message. I had to set UTF-8 locale to achieve the proper conversions. Now I am confused. It seems contradictory that libiconv and iconv would give different results... Or libiconv has another kind of parameter to conversions?

Regards,
Tomás



reply via email to

[Prev in Thread] Current Thread [Next in Thread]