You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Britta Schüle <br...@ixos.de> on 2001/06/06 10:10:42 UTC

UTF-8/Latin-1 problem

Hi,
I'm working on a project where xml's might have all sorts of encodings. The
parser deals with the UTF-8 stuff just fine, but when it gets a Latin-1
(iso-8859-1), it produces useless characters unless I set the encoding
explicitly.
Now I can't quite believe that the parser won't read the encoding from the
XML, so my question is, am I missing something? Is there a way to get the
parser to sort of "autodetect" an XML file's encoding?
I'm currently testing on the SAX2SAX sample in the Xalan-Java 2 download.
Thanks loads in advance,
Britta

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: UTF-8/Latin-1 problem

Posted by Kartik Pandya <pa...@yahoo.com>.
We had a similar problem - we were unable to show
German characters on browser and we though it's a
browers problem.  But I think you must try compiling
your Java classes with this option : 
"javac -Dfile:codepage=1252 yourclass.java"
It should solve the problem.

- KDP
--- Britta_Sch�le <br...@ixos.de> wrote:
> Hi,
> I'm working on a project where xml's might have all
> sorts of encodings. The
> parser deals with the UTF-8 stuff just fine, but
> when it gets a Latin-1
> (iso-8859-1), it produces useless characters unless
> I set the encoding
> explicitly.
> Now I can't quite believe that the parser won't read
> the encoding from the
> XML, so my question is, am I missing something? Is
> there a way to get the
> parser to sort of "autodetect" an XML file's
> encoding?
> I'm currently testing on the SAX2SAX sample in the
> Xalan-Java 2 download.
> Thanks loads in advance,
> Britta
> 
>
---------------------------------------------------------------------
> In case of troubles, e-mail:    
> webmaster@xml.apache.org
> To unsubscribe, e-mail:         
> general-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> general-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org