?

Log in

No account? Create an account
LJ client for macromedia flash - 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
lj_clients
[ex_inspirit429]
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
linkReply

Comments:
[User Picture]From: quirrc
2004-01-06 04:27 am (UTC)
maybe it's just displays incorrectly due to your style, check exact data that you send for subject and metadata. try first for english only. also it's better to give links to those incorrect posts.
(Reply) (Thread)
From: ex_inspirit429
2004-01-06 04:39 am (UTC)
http://www.livejournal.com/users/inspirit/32650.html
here is the link to incorrect post
i'm using russian characters in subject, event, mood, music
and thats what it returns...
and if i dont post any meta-data it displays pretty fine...
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 04:49 am (UTC)
it says NO such entry. can u post metadata with english?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 04:49 am (UTC)
sorry the link is broken, cause this incorrect post kills all the journal entries and my friends too... ((
--
he displays everything i this way:
пост из флэша () приношу свои извинения за временные неудобства
--
here is the url to screenshot:
http://www.inspirit.ru/lj_shot.gif
--
as u can see after one incorrect post it drives all othe russian posts display incorrectly too...
btw all english entries displaying correctly
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 05:07 am (UTC)
did u set any encoding in editinfo.bml? what client u use to post? did u urlencoded everything?
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 05:08 am (UTC)
r u viewing page as UTF8?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 05: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 05: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 05: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 05:49 am (UTC)
did you specified protocol version 1?
(Reply) (Parent) (Thread)
From: ex_inspirit429
2004-01-06 07:45 am (UTC)
yes i did
i put ther version 1
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2004-01-06 05: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 07: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 08: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 08:14 am (UTC)
http://www.livejournal.com/~inspirit/34295.html
--
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 09:25 am (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 09:27 am (UTC)
i didnt urlencoded the subject string... thats why it looks pretty fine
(Reply) (Parent) (Thread)