abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Berry <chriswbe...@gmail.com>
Subject Invalid UTF-8
Date Wed, 29 Aug 2007 02:46:40 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message