Re: [Vala] How to write a string to an IOChannel



On Mon, April 28, 2008 10:15, Frederik wrote:
I would like to write a string to a GLib IOChannel (a file), but
IOChannel.write_chars() wants a char[] as argument.

We should probably add a get_bytes() or get_utf8_bytes() method to the
string class that returns the UTF-8 bytes. Not sure whether there is an
easy workaround for that right now. However, I recommend you to use
GOutputStream instead of GIOChannel, if you can use GLib 2.16.
GDataOutputStream has a put_string method.

Juerg





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