Skip to main content

Parsing Unicode XML using kXML

2 replies [Last post]
Anonymous

Hi,
Has anyone tried parsing Unicode xml (UTF-8 encoding) using kXML parser.

The following code doesn't seem to work:

InputStreamReader reader = new InputStreamReader(is, "UTF-8");
XmlParser parser = new XmlParser();
paser.setInput(reader);

thanks,
Avi

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Barry White

It may be a silly question, but are you getting an
UnsupportedEncodingException ?

I'm a bit rusty but as far as I remember UTF-8 support was only a
requirement in the MIDP2 spec.

barry

Avi Mizrahi wrote:
> Hi,
> Has anyone tried parsing Unicode xml (UTF-8 encoding) using kXML parser.
>
> The following code doesn't seem to work:
>
> InputStreamReader reader = new InputStreamReader(is, "UTF-8");
> XmlParser parser = new XmlParser();
> paser.setInput(reader);
>
> thanks,
> Avi
>
>
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body of the message "signoff KVM-INTEREST". For general help, send email
> to listserv@java.sun.com and include in the body of the message "help".

--
Barry White
Application Developer

Fotango Ltd.
64 Ironmonger Row, EC1V 3QR, London, UK
Registered in England & Wales, company no. 03945045

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Thomas Landspurg

This works for me...What exact issue do you have?

On 3/22/07, Avi Mizrahi wrote:
>
> Hi,
> Has anyone tried parsing Unicode xml (UTF-8 encoding) using kXML parser.
>
> The following code doesn't seem to work:
>
> InputStreamReader reader = new InputStreamReader(is, "UTF-8");
> XmlParser parser = new XmlParser();
> paser.setInput(reader);
>
> thanks,
> Avi
>
>
>
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".

--
Thomas Landspurg
http://blog.landspurg.net

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]