[libxml++] program crashes when parsing XML with accent



I have an XML document in ISO-8859-1 character set. When using libxml++-2.6, 
the sax pasers crashes when it encounters a character with an accent (é) in 
the on_characters method. I'm using the Glib::ustring class.

With libxml++-1.0 on the same document, it did not crash, but the character 
was transformed in two (strange) characters. 

With libxml++-2.6 I have this back trace:

#0  0xffffe410 in ?? ()
#1  0xbfffeb6c in ?? ()
#2  0x00000006 in ?? ()
#3  0x00005550 in ?? ()
#4  0x40397640 in raise () from /lib/tls/libc.so.6
#5  0x40399149 in abort () from /lib/tls/libc.so.6
#6  0x403190f5 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.5
#7  0x40319132 in std::terminate() () from /usr/lib/libstdc++.so.5
#8  0x403192b2 in __cxa_throw () from /usr/lib/libstdc++.so.5
#9  0x402ca4aa in std::__throw_length_error(char const*) () 
from /usr/lib/libstdc++.so.5
#10 0x4030a7b0 in std::string::_Rep::_S_create(unsigned, std::allocator<char> 
const&) () from /usr/lib/libstdc++.so.5
#11 0x4030b8ff in std::string& std::string::_M_replace_safe<char 
const*>(__gnu_cxx::__normal_iterator<char*, std::string>, 
__gnu_cxx::__normal_iterator<char*, std::string>, char const*, char const*) 
() from /usr/lib/libstdc++.so.5
#12 0x40307a6c in std::string::string(char const*, unsigned, 
std::allocator<char> const&) () from /usr/lib/libstdc++.so.5
#13 0x401a8022 in Glib::ustring::ustring(char const*, unsigned) () 
from /usr/lib/libglibmm-2.4.so.1
#14 0x400415e8 in xmlpp::SaxParserCallback::characters(void*, unsigned char 
const*, int) () from /usr/lib/libxml++-2.6.so.1
#15 0x4010b374 in xmlParseCharDataComplex () from /usr/lib/libxml2.so.2
#16 0xbfffeec0 in ?? ()
#17 0x00000002 in ?? ()

What could be the reason for this problem?

-- 
Frederik Himpe




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