Yes that's right, it's UTF-8 but i want to be able to transcode it to ISO-8859-1. You're right i'm using the XMLString::transcode() method and i'm guess from what you say that it's not the best way to do it. That's how the orginal XML file looks like: <?xml version="1.0"?> <name>Moléculaire</name> ....
What shall i use than to transcode it properly, i mean to display the name properly using sax? --- [EMAIL PROTECTED] a écrit : > > 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] > > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]