[gtkmm] unicode question



Hi.

Has anybody had some experience on parsing a Glib::usting
containing unicode characters with libxml++??

I have a Glib::ustring that containes XML data.
The tag contents may contain unicode characters.

(After all it's a vocabulary trainer I'm writing. <g>)

Now I don't seem to be able to parse this ustring with libxml.
Each time the string contains anything exotic (like german umlauts)
libxml++ cuts the string off and keeps only the part following and
including the special character.


THE CODE:

Glib::ustring data;
		
std::ifstream from(filename.c_str());
if (!from) cout << "readerror\n";  // TODO inform user

char ch;
while(from.get(ch)) data += ch;

// here the string still looks okay.

XMLParser<OlvuParser> olvuParser;
olvuParser.parse_chunk(data);


Greetings ... ollo




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