?

Log in

No account? Create an account
UTF-8 support - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

UTF-8 support [Mar. 20th, 2002|01:43 pm]
LiveJournal Client Discussions

lj_clients

[happypenguin]
Hi, I'm having a crack at writing my first client (nothing fancy, just a personal project). With the upcoming UTF-8 support, what format does my client want to send data in as? Just convert every character to unicode and be done with it? At the moment, /developer/protocol.bml still says convert characters to their hex code...

Apologies if this has already been covered, I've tried to follow lj_clients for the past couple of months and nothing seems to have come up...
linkReply

Comments:
[User Picture]From: avva
2002-03-20 06:36 am (UTC)
1. First, translate your input stream into UTF-8. UTF-8 is an encoding used to transmit Unicode.
2. Second, include ver=1 with every request (new attribute=value pair which states the version of the protocol that the client uses).
3. Third, url-encode your input stream as usual (with hexcodes, etc., as specified in protocol.bml) and send it over.

On output, expect everything to be in UTF-8.

That's the simple way of putting it. The protocol documentation on site will shortly be updated with a complete explanation and documentation.
(Reply) (Thread)
[User Picture]From: happypenguin
2002-03-20 07:37 am (UTC)
Thanks Avva ^_^ I'll make a start with the info you've given me, and fix it when the documentation is updated.
(Reply) (Parent) (Thread)
From: kingofhugs
2002-03-20 06:15 pm (UTC)

Same here

I'm also working on a client for fun, in Java. I was a little confused about the statement that says you must "quote all values". It made me think you had to put your values within double quotes in addition to the other encoding.

I hope the web page is updated if the encoding changes. I just wrote my encode method last nice! :-) Wasn't much work, but...



(Reply) (Parent) (Thread)
[User Picture]From: happypenguin
2002-03-20 06:23 pm (UTC)

Re: Same here

Java as well here...
(Reply) (Parent) (Thread)