Hi, I have a similar problem. I am parsing iso-8859-1 html page with a sax parser but having trouble to display it on _some_ devices (characters é è ... are replaced by random symbols). On some devide i have to use myString.getBytes("iso-8859-1") to display it correctly, and on some other devices, myString will be displayed correctly.
The best solution i cold ifnd so far is to provide a user option like "force utf8" or "force iso-8859-1" that the user can check if having problem. Thierry. 2010/2/4 MobDev <developm...@mobilaria.com> > Well, > to be honest your first idea was also mine :P So I already looked via > Google but to be honest I haven't found that many clear discussions/ > explanations... > I also tried idea 2 and this is what I got : > > "Congratulations > > The document located at <http://xxxxx> was successfully checked as > well-formed XML. This means that we were not able to determine the > exact document type, but that the document passed the XML well- > formedness syntax check. If you wish to wish to perform formal > validation of the document, you can use the "Document Type:" option of > the validator. " > > But also this has been found, even though I do not know how important > this is : > "The DOCTYPE Declaration was not recognized or is missing. This > probably means that the Formal Public Identifier contains a spelling > error, or that the Declaration is not using correct syntax, or that > your XML document is not using a DOCTYPE Declaration. > > Validation of the document has been skipped, and a simple check of the > well-formedness of the XML syntax has been performed instead. " > > Als, just to point out, at this point i CAN read out the XML stream by > using the > Xml.parse(is, Xml.Encoding.ISO_8859_1, new ExampleHandler(myAdapter)); > method... > The only problem that remains is when I try to write on-screen the > values... > Btw, is there a way to trasform such a String (for example from a > <Country ID="2" CName="Åland eilanden"/> tag) to utf-8 ? > I have experienced such a problem on the iPhone some time ago, it also > received the data as ISO-8859-1 but the STring had to be encoded to > UTF8 to be shown correctly onscreen.... > > On 4 feb, 11:47, Frank Weiss <fewe...@gmail.com> wrote: > > I have two ideas for you, Mobdev: > > > > 1) Google for "not well-formed (invalid token)" and see what other people > > have found regarding this error. > > 2) Go to validator.w3.org and see if the XML file in question is indeed > > valid or not. > > > > Please let us know what you find out. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Thierry. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en