|
From: | Joop Stakenborg |
Subject: | Re: [Xlog-discussion] UTF8 support in 0.9cvs, and other wishes |
Date: | Tue, 12 Aug 2003 16:14:33 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 |
Tomi Manninen wrote:
As I have been playing with this in gmfsk, I'll jump in with a smallwarning. The g_locale_to_utf8() call may be a bit dangerous in some situations as the users locale might also be (mis)configured so thatthe charset used in the configuration does not accept 8 bit characters at all. The call then fails if it encounters any 8 bit chars andreturns NULL. This might not be an issue in xlog but it's worth to have good error checking and handling when using it (or use g_convert() with explicit charsets). I learned this the hard way when Carl ported gmfsk to BSD.. :)
Thanks Tomi, hopefully we will have enough betatesters to get xlog UTF-8 proof.I have added error checking on log-reading, it prints to the console. I guess I could popup a message window in case things go wrong.
And btw g_locale_to_utf8() allocates the returned string so the strdup above is not needed. Oh, and another potential source of problems is filenames. If you haveconfigurable filenames you need to convert them with g_filename_from_utf8() before using...
Good point, people could use special language characters for lognames and paths.
-- 73 de Joop PG4I ex - PA4TU PA3ABA
[Prev in Thread] | Current Thread | [Next in Thread] |