Re: [gtkmm] Problem with g_io_channel_read_chars



> > > 1. where is described which encodings are legal to use in Glib::convert?
> >
> > iconv --list gives you a list of known encodings. Note that this list
> > is not guaranteed to be the same everywhere (depends on the version of
> > iconv). The common encodings should however be available everywhere.
>

thanks, that works.
Daniel Elstner wrote:

> >
> > > 2. how to determine what is current encoding for your connection, or
> > > where it's derived from?
> >
> > read the GLib API reference.
>
> I doubt this is mentioned in the GLib API reference.  Without explicit
> charset handling the protocol, you're basically fucked.  Hmm.  I might
> be missing something, dunno.
>

Well, I know about g_io_channel_get_encoding, I meant I would to know encoding
of data I just read from the channel. Btw, if I did
g_io_channel_set_encoding(chan, 0, 0) (that should set encoding to NULL, right?
or I had to send "NULL" as parameter?) g_io_channel_read_chars() returned same
conversion error as before.

>
> > > 3. if I used g_locale_to_utf8(), should I remove ptr, that it has
> > > returned, with g_free()?
> >
> > read the GLib API reference.
>
> Or just use Glib::locale_to_utf8() instead.

Heh, I have to learn more about glibmm :).
Thanks, Daniel, you're always very good helper.
And, I liked your work on CellRenderers :).

-Andrew





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