[xml] UTF-8



Hello,
 
I would like to parse xml document, adding to it special polish signs.
As I read UTF-8 support polish signs, but what about libxml2.
 
I have got following xml file:
 
<?xml version="1.0" encoding="UTF-8"?>
.
.
.
<sth:name>3</sth:name>
<sth:pw>passwd12345</sth:pw>
.
.
.
 
When I am trying to replace content of <sth:name> and <sth:pw> with special polish signs I get the following error:
        temp/sth_temp.xml:6: parser error : Input is not proper UTF-8, indicate        
            encoding !
            <sth:name>żźżźż</sth:name>
                                     ^
        temp/sth_temp.xml:6: error: Bytes: 0xBF 0x3C 0x2F 0x64
            <sth:name>żźżźż</sth:name>
                                     ^
        Critical error --> document not parsed succesfully
 
 
What is interesting, that after parsing the file content of <sth:name> has the polish signs, but <sth:pw> is not changed.
 
Maybe someone can tell me how to insert polish signs to xml file using libxml2.
 
thanks a lot
 
M


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