Re: gettext and utf-8 in Gnome 2



Kaixo!

On Tue, Nov 27, 2001 at 05:06:11PM +0100, Carlos Perelló Marín wrote:

> > > bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");  /* add this call */
> > 
> > What does exactly that call does ? Isn't one call that does the same
> > for all textdomains ?
> 
> This call tells glibc that it should encode all strings as UTF-8
> althought the user had iso-8859-* codeset at his locale. This way, the
> user will get always UTF-8 strings for this application.

Ok, it is was I suspected it to be.
However, I don't understand why it is dependent on the textdomain; there
isn't a global charset overriding function ? I don't understand very well
the logic of overriding the charset output only for messages coming from
a given po file, and letting the other messages be in another encoding (well,
in some cases it may indeed be useful; but in the majority of cases it
would be nice to just override charset for all messages).
 
> > > or force all po files to be in utf-8.
> > 
> > That works even if user locale is not utf-8 ?
> 
> The answer is... It's only useful if the user locales is != utf-8 

No, the answer is: it doesn't work. (it used to work when glibc iconv didn't
work, it was not a feature but a bug)
 
> > When I last tested one gtktest (or was it pangotest) package, the po files
> > were all in utf-8; however, if I didn't launched the test program under
> > an UTF-8 locale it didn't work correctly.
> 
> I think that the problem was that gtktest didn't called this function.

Indeed.

So I learned one more thing, thanks.
 
-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.srtxg.easynet.be/		PGP Key available, key ID: 0x8F0E4975




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