Log in

No account? Create an account
LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Server returns ISE for a ATOM API UTF8 post with international characters. [Oct. 20th, 2005|08:08 am]
LiveJournal Client Discussions


I have been using home grown software with ATOM API for a while to post to LJ. Lately I fixed the encoding to be proper UTF8 and now when posting international characters server returns 500 Internal Server Error. Without international characters everything works fine.

Capture for the body from the post: http://www.dblock.org/bric-a-brac/lj/cap1.gif



[User Picture]From: quirrc
2005-10-21 08:38 pm (UTC)
That is text that worked:

<?xml version="1.0" encoding="UTF-8"?><entry xmlns="http://purl.org/atom/ns#"><generator


<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://purl.org/atom/ns#">
<summary xmlns="http://purl.org/atom/ns#">&lt;STRONG&gt;
<link xmlns="http://purl.org/atom/ns#"
type="application/x.atom+xml" rel="service.edit" href="http://test.livejournal.org/interface/atom/edit/265"
  <link xmlns="http://purl.org/atom/ns#" type="text/html"
rel="alternate" href="http://test.livejournal.org/users/quirrc/67930.html"

That is unicode, real request is in utf8. Then start adding your data and see when it will stop working.
(Reply) (Thread)
[User Picture]From: orangebitch
2005-10-22 05:36 pm (UTC)
I spent some time on this with no results - maybe something wrong with my encoding. Would it be possible to get the full working repro - a full netmon trace for example?

Much appreciated,

dblock at dblock dot org if you want to e-mail something
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2005-10-22 06:10 pm (UTC)
you have data that works and that does not. merging them until it stops working will show the error for sure. also you test with very complex html, use plain text and specify all other attributes that i used like mode=escaped. the error may be in html rather than in encoding but appearing only for non english text.
(Reply) (Parent) (Thread)
[User Picture]From: orangebitch
2005-10-22 07:12 pm (UTC)
Yep, I was chasing a red herring. The real problem was malformed xml generated by my code, a side effect of Russian characters.
(Reply) (Parent) (Thread)
[User Picture]From: orangebitch
2005-10-22 07:01 pm (UTC)
Nevermind! I was chasing a red herring. Some side effect of having russian text was generating malformed xml, stuff that should have been in a CDATA section.

(Reply) (Parent) (Thread)