?

Log in

No account? Create an account
XML-RPC unicode - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

XML-RPC unicode [Oct. 28th, 2005|02:06 pm]
LiveJournal Client Discussions

lj_clients

[vodex]
Hi, I'm slowly developing a LJ-to-Wordpress importer using XML-RPC (see original post where I discover the interface exists), and suddenly I am getting the following:

Client error: Protocol version mismatch: Cannot display/edit a Unicode post with a non-Unicode client. Please see http://www.livejournal.com/support/encodings.bml for more information.

That page says:

If there is a newer version of your client program that supports Unicode, upgrade. If not, you will be able to edit entries which contain ASCII symbols only (basically
the Latin alphabet and the usual punctuation signs). For entries any fancy symbols or other languages you will have to resort to editing via the web interface, which works fine in any case.


My dev environment hasn't changed, so at first I thought LJ had gone to some sort of Unicode-only interface. However, upgrading to the latest version of the popularhttp://phpxmlrpc.sourceforge.net/ (which is what I'm using) hasn't resolved this. (FWIW, I have also tried setting ['xmlrpc_defencoding'] to 'ISO-8859-1' as the docs state to force client encoding.)

I have no idea why the script has ceased working. Can anyone help? Should I be using a different PHP XML_RPC library, or has my environment changed somehow without me realising?
linkReply

Comments:
[User Picture]From: mcfnord
2005-11-03 04:29 pm (UTC)
Using the pre tag defeats word-wrapping. I have dropped the lj_clients community for a while until your post scrolls. You would be kind if you wordwrapped conservatively when using the pre tag.
(Reply) (Thread)
From: evan
2005-11-03 04:31 pm (UTC)
Yeah, try using <code> unless the whitespace is significant.
(Reply) (Parent) (Thread)
[User Picture]From: vodex
2005-11-04 10:33 am (UTC)
This is the second time I have submitted a post to this community, and the second time it has come out mangled after modding. Sorry, but at least this time I can edit the post...
(Reply) (Parent) (Thread)
From: evan
2005-11-03 04:33 pm (UTC)
ISO-8859-1 is definitely the wrong thing to be using here.

  1. Here's a really simple article to get you in the right mindset: http://www.joelonsoftware.com/articles/Unicode.html
  2. Pass the version (or ver?) with a value of 1 to indicate you client does the right thing.
(Reply) (Thread)
(Deleted comment)
[User Picture]From: vodex
2005-11-04 10:33 am (UTC)
Thanks for this, you're sounding confident, I shall try it out when I can and see...
(Reply) (Parent) (Thread)
[User Picture]From: vodex
2005-11-04 11:38 am (UTC)
Yes, that worked fine thanks. Doesn't help the mystery of why it stopped working though, and don't want to voodoo assume 'they have changed something', but it's good now :)
(Reply) (Parent) (Thread)
From: evan
2005-11-04 01:33 pm (UTC)
I think you haven't seen it in the past because the post you're looking at now contains Unicode but others didn't.
(Reply) (Parent) (Thread)