Log in

No account? Create an account
XML-RPC unicode - LiveJournal Client Discussions — LiveJournal [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


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?

From: evan
2005-11-03 07: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 01:33 pm (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 02:38 pm (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 04: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)