> The problem i have is that i need to parse a huge file
> that's why i decided to use the sax parser. however
> the file contains a particular encoding and the parser
> fails to transcode those strings. For example one line
> says <name>Moléculaire</name>

It's very very unlikely the parser cannot transcode data, as long as 
document contains an XML declaration with the proper encoding.  When you 
say "For example one line says...", what do you mean?  Is that the text in 
your XML document?  What does the XML declaration look like?

> When i display the tag name its empty so i assume that
> the parsers fails to return the string because of its
> encoding. That's why i want to change the encoding to
> replace by <name>moléculaire</name> which would be the
> correct text.

Ahh, now we're getting somewhere.  How do you "display" them?  Are you 
using the XMLString::transcode() function?  If so, are you certain the 
local code page can encode those characters?  Using XMLString::transcode() 
is very dangerous, and not likely to do what you want with every possible 
encoding and local code page.  Rather, you should write your application 
to use UTF-16 internally.

> I'm a bit confused on how to do that. The transcode
> method can help ? The correct encoding would be
> ISO8859-1

Well, the snippet you quoted above from your XML document is _not_ encoded 
in ISO-8859-1 (it's UTF-8), so now I'm really confused...

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to