Re: [libxml++] problem with utf8 xml file parsing ('Glib::ConvertError')



Murray Cumming wrote:
On Sun, 2008-05-04 at 00:06 +0200, Nicolas wrote:
Hello!

I tried to parse utf8 .xml files with the sample program example/sax_parser/ (i've tried with both 2.20 and 2.23 versions). The program crash during the execution at the position of the first utf8 char with the following message : "terminate called after throwing an instance of 'Glib::ConvertError'
 20 Abandon (core dumped)"

In C++ you need to catch exceptions to prevent crashes.
And you need to find out what part of your code caused an exception to
be thrown.

Are you using std::cout? std::cout does not understand UTF-8, so
Glib::ustring tries to convert first.

Have you tried your XML document with one of the libxml++ examples?

Hello,
Thank you for your answer,
I didn't change the code of the libxml++ example program contained in the "example/sax_parser/" directory.






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