[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: displaying a multilanguage file
- From: john vivian <viv veeev com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: displaying a multilanguage file
- Date: 23 Feb 2003 19:26:05 -0500
On Sun, 2003-02-23 at 18:50, Owen Taylor wrote:
> On Sun, 2003-02-23 at 18:21, john vivian wrote:
> > Would anyone know where i might find information on how to
> > load a file with characters from several languages into a
> > GtkTextBuffer? Are there glib functions to handle this?
>
> It just works, nothing different than inserting text one language.
>
> To extend on that:
>
> - All text in GTK+ must be encoded in UTF-8. There are routines
> in GLib for converting between different encodings.
>
> - You may get better rendering by telling Pango what language
> something is using the "language" property of GtkTextTag. Hi Owen.
Thanks for the quick reply.
What functions should i be using to read the file? i have
been using fgetc or fgets, and inserting the result directly
into the textbuffer, but i will get errors is there are non-
printable characters. i have tried playing around with some
of the g_* unicode / utf8 functions, but have not found the
right combination.
i am unsure as to the language necessary when inserting, and
will need to display several languages in one file. i have
been testing against a test file located here:
http://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt
i believe my problem is that multi-byte characters are not
being handled properly when reading them from the file.
Thanks again for any help.
--
john vivian <viv@veeev.com>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]