I always look at bits in the stream to debug UTF-8 encoding problems.

Although you said the encoding is UTF-8, you ought to specifically verify:
1) The encoding given in the HTTP response
2) The encoding given in the XML prologue
3) The encoding setting of the Reader underlying the XPP.

On Tue, May 18, 2010 at 3:00 AM, Samuh <[email protected]> wrote:

> I am parsing a RSS2.0 feed on Android using XML Pull Parser. The
> encoding for the XML is set as UTF-8. The parser fails giving invalid
> token exception.
>
> When I save the received XML feed file and open it in the
> browser(FireFox), the browser cannot render the XML and spits out an
> "Invalid token(unicode 0x12) exception".
>
> XML(encoded with UTF-8) does not recommend such characters but
> assuming that I don't have any control over the XML file being
> received, how do I handle such cases?
>
> Please help.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to