On Fri, Oct 21, 2005 at 11:04:39AM -0400, Gil Glass wrote:
> what comes back is
>
> est?
You need to call setlocale() at least for the LC_CTYPE, but preferably for
all categories, prior to using gettext functions. E.g.
...
#include <locale.h>
...
int main (int argc, char *argv[]) {
setlocale(LC_ALL, ""):
...
}
And of course you need to have an UTF-8 locale set on your system (e.g.
LANG=en_US.UTF-8).
> ANOTHER PROBLEM: If I want to display the word "maƱana" for example, I
> would encode it as "ma\xC3\xB1ana". However, the "\xB1a" is considered to
> be a single hex number! How can I indicate that I want the byte \xB1
> followed by the letter 'a'.
I don't know the answer (maybe \x{B1} - but this is only a guess). But you
should forget this syntax. Unicode and UTF-8 were not invented to see proper
accented letters on the screen everywhere, even when developing or
translating, and not some silly escape sequences which are totally
incompatible across different utilities. Take an UTF-8-aware text editor and
write raw UTF-8 into your .po file.
--
Egmont
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/