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 14:22:54 GMT
If you are typing the literal character "รค", you might want to try
replacing that with the escape sequence \u00e4.  We had to make a
similar change in one of our unit tests.

- 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...

View raw message