Re: locale_to_utf8 crashes on WinXP with Gtkmm 2.8.4 / Glibmm 2.8.6 and Gtk+ 2.8.18 / Glib 2.10.3
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org
- Cc:
- Subject: Re: locale_to_utf8 crashes on WinXP with Gtkmm 2.8.4 / Glibmm 2.8.6 and Gtk+ 2.8.18 / Glib 2.10.3
- Date: Sun, 4 Jun 2006 22:21:54 +0100
On Saturday 03 June 2006 23:09, Chris Vine wrote:
> It is very bad practice to call Glib::locale_to_utf8() on a string literal
> because it will only work if the codeset locale on the machine on which the
> code is compiled is the same as the codeset in which the string literal
> happens to have been written. These may not even be the same if the code
> is written and compiled on the same machine (it will depend on the editor
> with which the code is being written).
Actually, on reflection it is more problematic than that. It will only work
reliably if the codeset of the string literal as saved to file by the editor
and compiled into the binary happens to be the same as the locale codeset
under which the program is run by any particular user.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]