Re: --enable-unicode



On Sun, 27 May 2001, Cyrille Chepelov wrote:


I think I'm going to turn it as enabled by default, at least for the current
CVS cycle.

I haven't been able to crash this code, and it works at least as good as the
previous code with respect to i18n (it should of course be better).

Any loud screams ?

Nope.  We should also look at switching the internal encoding in .dia
files to utf8.  This will be needed when we switch over to gtk+ 2.0 and
libxml2 (even though you can compile dia with libxml2 at the moment, you
get corruption if you use any 8 bit characters in your diagrams).  Note
that this is not really an issue for the windows port, as it already uses
utf8 internally; this should make diagrams with 8 bit characters portable
between windows and unix machines however.

In lib/dia_xml.c, we can see that it is prepending and appending hashes to
the strings.  One way to handle this would be to treat strings starting
with hashes as the locale's encoding and anything else as utf8.  Of
course, this will cause problems for utf8 strings where the first
character is a hash.

Getting the locale's charset doesn't look that trivial.  There is a
function that does this in HEAD glib (g_utf8_get_charset_internal in
gutf8.c).  Once we have code to get the charset, it is just a matter of
adding the appropriate iconv calls in lib/dia_xml.c

James.

-- 
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






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