Log in

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

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

Encoding problems [Oct. 31st, 2006|01:26 am]
LiveJournal Client Discussions
[music |Fourth Dimension - За Гранью]

I'm developing a lj client and I incure some problems with post's encoding. Client posts in utf-8 encoding via curl library, all spaces replaced with +, it happens successfuly and event seen in my blog but when I try to edit entry lj web interface tell me that the post isn't in unicode but it is. Where is a problem?

[User Picture]From: ralesk
2006-10-30 06:18 pm (UTC)

I don’t know what curl does exactly, but you have to URL-encode everything in the POST-ed HTTP message’s body; a UTF-8 non-latin character should become, say, two or three %xx phrases (depending on what bytes encode it.  Simply said, just turning all spaces into + is not enough.

Also it might be a good idea to send ver=1 to show that you’re a modern client.  LiveJournal defaults to ver=0, which are all the legacy clients which didn’t support UTF-8.

(Reply) (Thread)
From: redchrom
2006-10-30 06:39 pm (UTC)
Thanks! ver=1 is exactly what I need, all works now.
(Reply) (Parent) (Thread)