Re: [gtkmm] unicode question
- From: Daniel Elstner <daniel elstner gmx net>
- To: Ollo <daollo web de>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] unicode question
- Date: 21 Sep 2002 00:58:34 +0200
Am Mit, 2002-09-18 um 22.21 schrieb Ollo:
> 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.
UTF-8 encoded 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.
What does it mean, "looks still okay"? How do you test that?
You may want to try data.validate() to be sure.
> XMLParser<OlvuParser> olvuParser;
] [Thread Prev