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 byte 2 of 3-byte UTF-8 sequence.
Date Wed, 05 Sep 2007 15:06:10 GMT
Looking over the output I'm pretty much certain that changing the code
to use the \u escape sequence instead of the literal character will
resolve the issue.

- James

herbert wrote:
> Hi James!
> 
> I've just created a new jira-issue and posted the desired ethereal-streams
> on it and
> also my java-client-code. (please see readme.txt in the attached archive
> first for more explanations 
> and for system- and server-informations.)
> 
> No I am not sending literally the string "some legal UTF-8-Characters",
> I'm sending exactly one UTF-8-Character, and that is \u00e4. Or speaken 
> as a HTML-Character-Entitiy: &auml; 
> This character is put in with the java-editor of my IDE. The java-editor has
> got the encoding-setup UTF-8.
> 
> Regards,
> 
> herbert
> 
> 
> 
> 
> James M Snell wrote:
>> If you can, please try to capture the on-the-wire bits using a tool like
>> ethereal, zip it up and post it to the issue in jira?  Also, what
>> platform are you running on the client/server, what app server are you
>> using, etc.  Also, what UTF-8 characters are you sending?  Is it
>> literally the string "some legal UTF-8-Characters" or are you sending
>> actual non-ascii chars?
>>
>> - James
>>
>> Iops@gmx.de wrote:
>>>> BTW: I ran these XML documents with the supposed invalid chars thru 2  
>>>> different UTF-8 conversions as I read them from disk, before putting  
>>>> them into the <content>
>>>> And I also processed them with the Unix "iconv" utility
>>>> So I am pretty darn sure that there are no invalid chars in there.
>>> In my case I don't even have any xml-documents, that could have 
>>> UTF-8-illegal characters. All the work is done by AbderaClient:
>>>
>>> [...]
>>> Abdera abdera = new Abdera();
>>> Client client = new CommonsClient(abdera);
>>> RequestOptions requestOptions = client.getDefaultRequestOptions();
>>> requestOptions.setContentType("application/atom+xml");
>>> Factory factory = Abdera.getNewFactory();
>>> Entry entry = factory.newEntry();
>>> entry.setId("someId", false);
>>> entry.setTitle("some legal UTF-8-Characters");
>>> ClientResponse response = client.post(serverUrl, entry, requestOptions);
>>> [...]
>>> Response ist HTTP 400 - Bad request...
>>
> 

Mime
View raw message