[LIP] Reading UTF-8 files in GTK+
Kumar Appaiah <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <20070224190041.GA19278@localhost> |
Dear LIP, I have a need to read in a UTF-8 text file into a text area in a simple GTK+ application. Now, I know that UTF-8 is working fine, since if I open the file in UTF-8, the characters show up properly. However, whenever I try it in my application, whenever a UTF-8 file is loaded, I get the following message: (llf_utf:19274): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed How am I to read UTF-8 files and display thm the right way? As of now, I am using g_file_get_contents and have tried g_convert, but it fails. What do I do? Thanks. Kumar -- Kumar Appaiah, 462, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV