Thank you very much!  That seems to have done the trick!!  I was only setting the locale for LC_MESSAGES.  Changing it to LC_ALL worked.

Also, I found that, if I left the escape sequences in the .po file (\xC3\xA1), then it didn't work.  However, if I entered the "raw UTF-8" directly by typing ALT+0195 (0xC3) and ALT+0161 (0xA1), it did work.  I am assuming that this is what you mean by raw UTF-8 below.  While my editor is not actually UTF-8 aware, it does let me enter non-ASCII 8-bit characters by holding down <ALT> and typing the value in decimal.  Yes, I hang my head in shame as I admit that I'm editing on a Windows PC.  :-)

Thanks again for the help.

Cheers,
Gil Glass
Telecom Field Services
JDSU
Germantown, MD, USA
+1-240-404-2551



Egmont Koblinger <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

10/21/2005 11:35 AM

Please respond to
[email protected]

To
[email protected]
cc
Subject
Re: I18n, UTF-8, and Linux





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/


Reply via email to