Re: widechar support




phil@bolthole.com (Philip Brown) writes:

> [ Owen Taylor writes ]
> > 
> > phil@bolthole.com (Philip Brown) writes:
> > > 
> > > I see you folks have added localization, to some degree. But gtk is still
> > > missing one major thing right now: wide-char (16-bit) support.
> > 
> > Hmmmmm, actually, GTK has fairly good support for CJK languages.
> > Most of it is formulated in terms of multi-byte characters,
> > not wide-characters, but it comes down in the end to the
> > same thing for the user.
> 
> Huh. didn't know that. 
> 
> > If you locale is set to a CJK locale, then all of the text
> > related widgets (Label, Entry, and Text) support international
> > input and output.
> 
> when you say "international", do you mean "support 8 AND 16 bit chars
> randomly", or do you mean "now stuck in Chinese mode"?

I mean, support 8 and 16 bit characters according  to the rules
of the ja_JP (or cn_CN, etc) locale. Which you might interpret
as "stuck in Chinese mode"
 
> ANd is this something actually written into GTK, or might it just be an
> artifact of the window system and OS you happen to use it on?

No, GTK+ does not (yet) duplicate the OS services. So while
it should work on any halfway modern version of X, it
will depend on the OS's support for locales.

> > But the Japanese output needs of kdrill (the version
> > I have here anyways) are simple enough, that you
> > can probably just draw your characters "by hand"
> > using a different form of "wide character" support
> > in GDK.
> 
> err, what? 6500 chars, "by hand"? sounds like a nasty waste to me.

"By hand" means draw jis strings in GtkDrawingArea widgets
using GDK calls instead of using GtkLabel widgets.

Better?
 
> I just need an officially sanctioned method "Hey, use XDrawString16() instead
> of XDrawString()"
> 
> WITHOUT forcing the user to change their locale.
 
"Hey use "gdk_draw_string (drawable, sixteen_bit_font, gc,
                           (gchar *)wstring, ...)
 instead of gdk_draw_string() without the sixteen_bit_font"

;-)

Look at kanjipad.c. I might change a few things if I
was turning it documentation on how to do this stuff,
but it certainly works.

Regards,
                                        Owen




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