[Bug locale/26984] conversion to ascii//TRANSLIT with iconv does not work in C locale on many characters
carlos at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Apr 30 16:18:48 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=26984
--- Comment #9 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Vincent Lefèvre from comment #8)
> (In reply to Andreas Schwab from comment #7)
> > Characters outside the range of the locale charset are forbidden.
>
> Then what's the point of the -f option?
> And in the C locale, why does "€" get converted?
This got me digging. It turns out I was wrong.
Because the C locale is "builtin" to the library to be able to provide it 100%
of the time regardless of the upgraded state of the system, and to provide it
in a consistent way, there is a *limited* set of C locale transliteration
rules... but they are embedded (locale/C-translit.h.in).
There are indeed +1650 transliteration rules defined for the C locale.
So this refutes my argument that we shouldn't be doing transliterations in
C/POSIX.
In that case we *could* attempt to take all the neutral transliterations and
autogenerate locale/C-translit.h.in from them and thus resolve this issue by
providing all "neutral" transliterations to C/POSIX in a builtin way.
This would increase the .data for libc.so.6 to carry these builtin...
Thoughts?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list