Log in

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

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

LJ client for macromedia flash [Jan. 6th, 2004|10:25 am]
LiveJournal Client Discussions
people? i'm currently trying to make an lj client in flash and faced some problems:
*using XML-RPC Client/Server Protocol*
i need to have win1251 charset support cause i'm from russia thats why i'm sending all the info in UTF-8 encoded characters
so i found the way to convert win1251 to utf-8 via flash and posting messages with subjects quite alright, but when i'm trying to add meta-data items using russian symbols it fails...
the way i did it is the same i post events & subjects but it displays incorrectly in web bowser...
please, help me, if you have any ideas why it doesnt work...
p.s.: sorry for my bad english

[User Picture]From: quirrc
2004-01-06 08:08 am (UTC)
r u viewing page as UTF8?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 08:18 am (UTC)
i setted all settings in editinfo.bml to defauil (None)
i used my own macromedia flash client to post events
(also using Semagic to post)
i tried to urlencode when sending it to server but in this case it displays incorrectly too...
here is the schem i used:
1. encode ivent in utf-8
2. send it to server (via XML-RPC)
what u mean by asking "r u viewing page as UTF8?"
it setted in the head of webpage:

so i have to view it in UTF8
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 08:29 am (UTC)
the fact that one entry changes the look of the page may mean that browser incorrectly detects encoding. I've just see that it actually changes the look of the whole page, (maybe that's also an LJ error). Do the following: add such wrong entry, see page source and then delete entry and load again to compare 2 sources. if it's the same the problem is with browser (though anyway metadata is incorrect).
and try flat interface first, just send smth simple urlencoded
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 08:42 am (UTC)
the source are the same but in one it shows russian text correct and in another wrong...
i cant understand why... whats the difference...
how i must send this info to server so it would understand it correctly...
what conversions i should do?
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 08:49 am (UTC)
did you specified protocol version 1?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 10:45 am (UTC)
yes i did
i put ther version 1
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 08:53 am (UTC)
if you use some library for XML, you may be using it incorretly. better use flat inerface to make it clear for you. convert 1251 to UTF-8 to be lie PiPw etc. i.e. 2 byte sequeces, urlencode to %D0%98 etc., covert to UTF-8 and send. better use debugger (i don't know if it's possible for flash though). could u post here part of your conversion code?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 10:51 am (UTC)
once again before sending it i must:
1. convert to utf-8
2. urlencode ?
3. send

am i right?
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 11:09 am (UTC)
yes, but that's for flat, i don't know if xml is different (in UTF handling, all other is the same). try to send exactly the same strings for mood and text boby to see the difference.
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 11:14 am (UTC)
see what i got
i've urlencode mood, music and event after converting it to UTF-8
sending to XML-RPC
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 12:25 pm (UTC)
it's kinda weird. maybe you have missed smth and encoded twice, because those fields should be the same. the only difference i see is that subject contains english chars and it shorter than other fields while other are longer. you'd better use debugger or at least save your request (if you cant save from flash you can use some packet logger) and when you will use the same strings for all fields you'll see the difference.
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 12:27 pm (UTC)
i didnt urlencoded the subject string... thats why it looks pretty fine
(Reply) (Parent) (Thread)