I'm using the mediawiki Api to update some pages with an experimental robot. This robot uses the java apache http-client library to update the pages.
(...)
PostMethod postMethod = new PostMethod("http://mymediawikiinstallation/w/api.php");
postMethod.addParameter("action","edit");
postMethod.addParameter("title",page.replace(' ', '_'));
postMethod.addParameter("summary","trying to fix this accent problem");
postMethod.addParameter("text",content);
postMethod.addParameter("basetimestamp",basetimestamp);
postMethod.addParameter("starttimestamp",starttimestamp);
postMethod.addParameter("token",token);
postMethod.addParameter("notminor","");
postMethod.addParameter("format","xml");
int status = httpClient.executeMethod(postMethod);
(...)
however the 'content' String contains some accents. System.out.prinln(content)
looks ok, but the accentuated characters in the wiki look bad. E.g. 'Val�rie' instead of 'Valérie'.
How can I fix this ?