I'm using the Zend Framework HTTP client library to make an edit request to the MediaWiki API, as follows:
<?php // Instantiate the client object. require_once 'Zend/Http/Client.php'; $client = new Zend_Http_Client($apiUrl);
// Get necessary information. $title = 'Testpage'; $text = 'Æneas Mackintosh'; $basetimestamp = '2009-09-15T15:45:50Z'; $token = '6c9600319ea3a1188d4542cd3e1443c7+';
// Edit the page. $client->setParameterPost('action', 'edit'); $client->setParameterPost('title', $title); $client->setParameterPost('text', $text); $client->setParameterPost('basetimestamp', $basetimestamp); $client->setParameterPost('token', $token);
// Make the request. $client->request('POST'); ?>
After editing, the resulting wiki page should contain "Æneas Mackintosh" (note the AE ligature); instead it contains "�neas Mackintosh". I suspect that this is a MediaWiki API bug, since the POST request is what appears to be correctly formatted:
action=edit&title=Testpage&text=%C6neas+Mackintosh&basetimestamp=2009-09-15T15%3A45%3A50Z&token=6c9600319ea3a1188d4542cd3e1443c7%2B%5C
Has any one else had issues with special characters? Any solutions?
My configuration: MediaWiki 1.15.1 Zend Framework 1.9.2 PHP 5.2.6-3ubuntu4.2
Thanks, Jim