You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Chris Berry <ch...@gmail.com> on 2007/09/04 02:11:07 UTC
Re: Invalid UTF-8
I have created a small, self-contained JUnit test case which
reproduces/demonstrates this issue.
It would be great if I could present it to the Abdera Developers so
that they can determine if it is indeed a bug in Abdera.
Should I email the tar.gz somewhere??
I runs and builds out-of-the-box (using mvn install).
There is also a README.txt that details the output/issue
Thanks,
-- Chris
On Aug 28, 2007, at 11:24 PM, James M Snell wrote:
> 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
>>
>>
>>
>>
S'all good --- chriswberry at gmail dot com
Re: Invalid UTF-8
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/3/07, Chris Berry <ch...@gmail.com> wrote:
> I have created a small, self-contained JUnit test case which
> reproduces/demonstrates this issue.
> It would be great if I could present it to the Abdera Developers so
> that they can determine if it is indeed a bug in Abdera.
> Should I email the tar.gz somewhere??
> I runs and builds out-of-the-box (using mvn install).
> There is also a README.txt that details the output/issue
If you could file it as an issue in JIRA that would be great.
-garrett