Re: [libxml++] problem with utf8 xml file parsing ('Glib::ConvertError')
- From: dexter <dexter balabit hu>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] problem with utf8 xml file parsing ('Glib::ConvertError')
- Date: Mon, 05 May 2008 13:31:02 +0200
I can reproduce this problem with the index.xml file you attached,
although I'm not using the latest svn version.
I have ubuntu gutsy, glib version is: 2.14.1
----- Original Message -----
From: Murray Cumming <murrayc murrayc com>
To: Nicolas <nico picapo net>
CC: libxmlplusplus-general lists sourceforge net
Sent: Mon, May 05, 2008 1:09:37 PM +0200
Subject: [libxml++] problem with utf8 xml file parsing ('Glib::ConvertError')
On Sun, 2008-05-04 at 12:34 +0200, Nicolas wrote:
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)"
I didn't change the code of the libxml++ example program contained in
the "example/sax_parser/" directory.
Thanks. I have added some try/catches to examples/sax_parser/myparser.cc
in svn to show where the exception is being thrown. It is indeed
happening during std::cout << when trying to print out that chinese from
the attribute value. And I can reproduce it even with this simple
attached .xml file.
However, I don't understand why this is happening. Investigating only
confused me more: g_utf8_validate() does not fail on the string, but
g_locale_from_utf8() does.
That makes no sense to me so I am beginning to suspect that something is
wrong with my Ubuntu Hardy? What distro are you using? Can anyone else
reproduce this problem?
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
------------------------------------------------------------------------
_______________________________________________
Libxmlplusplus-general mailing list
Libxmlplusplus-general lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/libxmlplusplus-general
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]