Re: [gtkmm] Problem with g_io_channel_read_chars



Daniel Elstner wrote:

> What you have to do is something like:
>
> Glib::ustring foo = Glib::convert(bar, "UTF-8", "KOI8-R");
>

yes, yes, my connection wasn't UTF-8 encoded. I 've tried

    gchar *ptr = g_locale_to_utf8(in_buff, size, &rsize, &wsize, &error);

for my data, and it works well then.

I have few questions, though:

1. where is described which encodings are legal to use in Glib::convert?
2. how to determine what is current encoding for your connection, or where it's
derived from?
3. if I used g_locale_to_utf8(), should I remove ptr, that it has returned, with
g_free()?

thanks for all responses
-Andrew





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