Converting from ASCII to UTF-8



Hi guys,

I'm writing some text in a GtkTextBuffer. Text strings are ASCII encoded.
I've tried converting my string with g_convert() but I still don't see
any text written in the GtkTextView widget.

This is more or less what I have:
----------
char string[20] = "Hello world";

textBuffer	= gtk_text_view_get_buffer (...);
convertedString = g_convert(... "UTF-8", "ASCII"...);
gtk_text_buffer_set_text(...)
-------

How can I convert an ASCII string to a UTF-8 string? What am I doing wrong?

--
Amelio V.



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