|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
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.
it says NO such entry. can u post metadata with english?
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
did u set any encoding in editinfo.bml? what client u use to post? did u urlencoded everything?
r u viewing page as UTF8?
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
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
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?
did you specified protocol version 1?
yes i did
i put ther version 1
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?
once again before sending it i must:
1. convert to utf-8
2. urlencode ?
am i right?
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.
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.
i didnt urlencoded the subject string... thats why it looks pretty fine