abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Invalid UTF-8
Date Wed, 29 Aug 2007 04:24:07 GMT
Odd. The version of the woodstox parser has been updated in 0.3.0.  It's
entirely possible that the parser is being more strict about handling
UTF-8 content. Your convertStringToUTF8 method, how exactly is it doing
the conversion?

- James

Chris Berry wrote:
> Greetings,
> I am using the AbderaClient in my JUnits, and am getting very strange
> behavior.
> 
> On the Abdera Server, I explicitly convert the Content string to UTF-8
>     e.g.   entry.setContentAsXhtml( convertStringToUTF8(xml) );
> 
> Yet in the Client I get the following Exception
> 
> org.apache.abdera.parser.ParseException: java.lang.RuntimeException:
> [was class java.io.CharConversionException] Invalid UTF-8 middle byte
> 0x26 (at char #4173, byte #3999)
>         at
> org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:253)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
> 
> 
> As well as:
> 
> org.apache.abdera.parser.ParseException:
> com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x26 (at
> char #4710, byte #3999)
>         at
> org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:253)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
> 
>         at
> org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:93)
> 
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:224)
> 
>         at
> org.apache.abdera.parser.stax.FOMEntry.getContentElement(FOMEntry.java:175)
>         at
> org.apache.abdera.parser.stax.FOMEntry.getContent(FOMEntry.java:785)
> 
> When I call entry.getContent() ::
> 
>       e.g.  assertTrue( entry.getContent().indexOf( "id=\"4\"" ) != -1 );
> 
> This behavior did *not* start until I upgraded to the latest SVN of 0.3.
> 
> Does anyone have any idea's what I am doing wrong??
> Or a workaround??
> 
> Thanks,
> -- Chris
> S'all good  ---   chriswberry@gmail.com
> 
> 
> 
> 

Mime
View raw message