On Mon, 28 May 2001, James Henstridge wrote:
> 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).
clicked send before checking. This function can be handled by the
unicode_get_charset function in libunicode (which we already depend on for
Cyrille's unicode printing support).
> 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/