?

Log in

No account? Create an account
Unicode in the Music field? - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

Unicode in the Music field? [Jun. 19th, 2005|12:08 am]
LiveJournal Client Discussions
lj_clients
[livewidget]
I'm modifying my client (LiveWidget) to use Unicode, and have got it working for the subject and main entry text, but not for Music. Using XML-RPC Music is presented to the server in a slightly different way from most of the other data, so I was wondering if that made a difference to the XML I am creating. This is what I'm trying to use, except I turned all the < and [ into { to make sure this post came through

{value}{string}{!{CDATA{'+music+'}}}{/string}{/value}
linkReply

Comments:
(Deleted comment)
[User Picture]From: int
2005-06-20 03:09 pm (UTC)
This was the final straw that made me give up on XMLRPC - it's some weird bug that never got fixed. Try sending the music string as base64 encoded instead, should work.
(Reply) (Thread)
From: livewidget
2005-06-23 08:59 am (UTC)
I've found a site that tells me how to base64 encode a string. But how to I tell LiveJournal that I have done that? won't it just display the characters I've sent it?
(Reply) (Parent) (Thread)
[User Picture]From: int
2005-06-23 09:38 am (UTC)
Send it inside <base64> tags instead of <string> tags.
(Reply) (Parent) (Thread)
From: livewidget
2005-06-23 10:34 am (UTC)
Thank you evildoive. This is what I tried, but the server still responds with 'The text entered is not a valid UTF-8 strem'


''+
'current_music'+
'' + encode64(music)+''+
''

the encode64 function is the same one I've been seeing everywhere, i got this particular one from http://rumkin.com/tools/compression/base64.php.

and this is the string I tried to send in the music variable

á bünch of fûnny çhår
(Reply) (Parent) (Thread)
From: livewidget
2005-06-25 07:23 am (UTC)
Thank you evildoive. This is what I tried, but the server still responds with 'The text entered is not a valid UTF-8 strem'

'<member>'+
'<name>current_music</name>'+
'<value><base64>' + encode64(music)+'</base64></value>'+
'</member>

the encode64 function is the same one I've been seeing everywhere, I got this particular one from http://rumkin.com/tools/compression/base64.php.

and this is the string I tried to send in the music variable

á bünch of fûnny çhår
(Reply) (Parent) (Thread)