Re: Help - need some insight into experience.



"Dinesh Nadarajah" <dxn1972 hotmail com> writes:
> I am trying to understand the flow of conversions and so please bbare
> with me:
> 
> My messages are in iso-8859-1/15 format.
> I set my locale to ta_IN. I think the encoding for that locale is TSCII-0.
> Hence gettext tries to convert from iso-8859-1/15 to TSCII-0.

Yes, I believe that's correct.

> The font used to display the messages is also iso-8859-1/15
> compliant.

Should not be. You have to use a font that supports the encoding of
the locale. GTK's default font should support the locale encoding if:

 - you call gtk_set_locale(NULL) before gtk_init()
 - there is no warning message printed about "locale not supported by 
   C library"
 - you actually have fonts in your locale's encoding

If you load your own fonts, you need to use gdk_fontset_load() rather
than gdk_font_load(); gdk_font_load() won't work properly because it
doesn't automatically get the right font for the locale encoding.

This all applies to GTK 1.2.x, the 1.3.x series is completely
different (uses Unicode throughout, GdkFont replaced by Pango)

> Who do I contact about introducing versions of the ta_IN locale: e.g
> ta_IN.ISO8859-1/15.

This is an operating system issue, it happens on the C library level.
So it depends on the operating system. 

You shouldn't need to care about the encoding though - if your OS
comes with ta_IN using TSCII-0, then it should also come with fonts
that can be used in that encoding...

It's possible your OS already supports ta_IN.ISO-8859-1, try setting
your locale to that and it might work...

> If I converted all my messages to UTF-8 (conversion from iso-8859-1/15
> to UTF-8) can I still use my iso-8859-1 font or do I need Unicode
> fonts.

With GTK 1.2 UTF-8 is not treated specially in any way. If your locale
was a UTF-8 locale (ta_IN.UTF-8 or something), then yes you would need
a Unicode font, and GTK should automatically use it. If your locale is
iso-8859-1 then you need an 8859-1 font. And for TSCII-0 you need a
TSCII-0 font. At least, I think so. Possibly the X fontset mechanism
has some ability to use fonts from one encoding to emulate a font from
another encoding, I'm not sure.

Anyway, basically GTK 1.2 uses the locale model, which means that
everything works in the locale's encoding. You can't choose your own
encoding. GTK 1.3 instead works in UTF-8 encoding at all times, so you
don't have those issues.

Havoc




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