xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Grzegorz Kaczor" <grzegorz.kaczor AT gmail.com>
- To: "Luca Passani" <passani AT eunet.no>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] problems with "ä"
- Date: Mon, 22 Oct 2007 11:50:39 +0200
Hi,
How did you create the XML file? If you just pasted it from your text editor
the character may as well be encoded using ISO-8859-1 or some Windows-1252,
whichever. The character has code 228 in Windows-1252 while it is 00E4 in
Unicode - it should be encoded as bytes C3A4 (195 and 164). Try seeing the
file in some hex editor to get real contents of the file. If the "a umlaut"
character is one byte it is probably not encoded in UTF-8. You may also try
to insert ý instead of "a umlaut" to test.
Regards
Grzegorz
2007/10/22, Luca Passani <passani AT eunet.no>:
>
> Hi, I have a problem with char-enconding, UTF or whatever:
>
> if i write:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wurfl>
> :
> <contributor name="Ville Skytta" email="ville.skytta AT steam.fi"/>
>
> all is good, but if I try to report Ville's name faithfully:
>
> <contributor name="Ville Skyttä" email="ville.skytta AT steam.fi"/>
>
> heaven breaks loose:
>
> nu.xom.ParsingException: Invalid byte 2 of 3-byte UTF-8 sequence. in
> ..\CVS-Sour
> ceforge\xml\wurfl.xml
> at nu.xom.Builder.build(Builder.java:1157)
> at nu.xom.Builder.build(Builder.java:562)
> at CheckWURFLSyntax.doTheChecks(CheckWURFLSyntax.java:72)
> at CheckWURFLSyntax.main(CheckWURFLSyntax.java:64)
> Caused by: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte
> UTF-8 sequen
> ce.
> at
> org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:693)
>
> at org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:418)
> at
> org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityM
> anager.java:3265)
> at
> org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanLiteral(XML
> EntityManager.java:2536)
> at
> org.apache.xerces.impl.XMLScanner.scanAttributeValue(XMLScanner.java:
> 905)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(X
> MLDocumentFragmentScannerImpl.java:818)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> t(XMLDocumentFragmentScannerImpl.java:740)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
> LDocumentFragmentScannerImpl.java:329)
> at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> a:525)
> at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> a:581)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
> ava:1175)
> at nu.xom.Builder.build(Builder.java:1127)
> ... 3 more
> Exception in thread "main" java.lang.RuntimeException: cannot parse WURFL
> at CheckWURFLSyntax.doTheChecks(CheckWURFLSyntax.java:238)
> at CheckWURFLSyntax.main(CheckWURFLSyntax.java:64)
>
> any ideas? The legitimate name owner tells me:
>
> "Well, something's wrong in that case - the last char of my surname is
> "ä" ("a umlaut") which in UTF-8 is a 2-byte (not 3-byte) sequence..."
>
> Thanks
>
> Luca
>
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>
--
"Choć tyle wiemy własnym doświadczeniem:
W nas jest Raj, Piekło - i do obu - szlaki."
J.K.
-
[XOM-interest] problems with "ä",
Luca Passani, 10/22/2007
- Re: [XOM-interest] problems with "ä", Grzegorz Kaczor, 10/22/2007
-
Message not available
-
Re: [XOM-interest] problems with "ä",
Luca Passani, 10/22/2007
- Re: [XOM-interest] problems with "ä", Elliotte Harold, 10/22/2007
-
Re: [XOM-interest] problems with "ä",
Luca Passani, 10/22/2007
- <Possible follow-up(s)>
- Re: [XOM-interest] problems with "ä", Tatu Saloranta, 10/22/2007
Archive powered by MHonArc 2.6.24.