error about UTF_8 format while creating my xml using libxml and c++

J0RG325

New Member
I created an xml file using libxml and c++. What I want to do now, is reading from a .txt and put this text between some specific tags.I have tried the following code, just reading from a file and write it between tags:\[code\]char * s ;double d;fichier>>i>>s>>d;// fichier.close(); cout << s << endl ; xmlNewChild(root_node, NULL, BAD_CAST "metadata", BAD_CAST s );\[/code\]While running this code, I get this error:\[code\]output error : string is not in UTF-8 \[/code\]So I guess that there is a format incompatibility between the input and output. Can you help me please? I don't know how to fix this.
 
Back
Top