[xml] utf-8 related problems I think

I am having problems with the following code

xmlChar * utf8;   
xmlChar tmp[200]; 
sprintf(tmp,"%s_%d",someString, someInt); 
utf8 = &tmp[0]; 

everything here works, but later in another function I build an xml
document and write it to a flat file.  

I go on to add utf8 as one of the children of a node.
It all compiles fine but during run-time I get the following errors.

xmlEncodeEntitiesReentrant : input not UTF-8
xmlEncodeEntitiesReentrant : char out of range

It was all working until I changed something much simpler, to the four
lines you see above.  Can anyone see whats wrong here?


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