Re: Save files with correct character set



Ok, I forgot i used "setlocale(LC_ALL, "C")" in a function.
However, even if I remove it, it doesn't work at all... (Glib::locale_from_utf8 now works, but i think it convert an utf8 to utf8... Useful...)
If i try: Glib::convert(ustring, "UTF-8", "ISO-8859-15") it gets worst:
    The à become even longer and more unreadable (even in Gedit now)...

Il 22/03/2012 22:27, Spazzatura.Live ha scritto:
Right, I forgot... My locale is utf8...

As "to_codeset" variable should I just use: "iso-8859-15"?

Il 22/03/2012 22:20, Chris Vine ha scritto:
On Thu, 22 Mar 2012 22:07:03 +0100
Spazzatura.Live<kharhonte hotmail com>  wrote:
It doesn't work:
      Saving file failed: Invalid byte sequence in conversion input

Using: Glib::file_set_contents(filename,
Glib::locale_from_utf8(TextView.get_buffer()->get_text()));
OK, that means that ISO-8859-15 is not your locale encoding.  Use
Glib::convert().

Chris


_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list




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