This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: thoughts on martin's proposed patch for GCC and UTF-8
It translates the 6 chars "\u00f6" to 2 bytes in your
locale's charset and encoding, which is the right thing to do; RMS
(reluctantly, I think :-) agreed that \u requires locale-dependent
translation.
We have to do locale-dependent translation for \u in a non-wide
string, because the character meaning of a \u escape is
locale-independent, while the proper multibyte representation of any
given character in a non-wide string is locale-dependent.
It might be appropriate to do locale-dependent translation for \u
in a wide string, in case the locale's wide character representation
is not Unicode. But maybe it is ok to say, "you lose in that case."