We are using putpage (
https://www.dokuwiki.org/devel:xmlrpc#wikiputpage) thru perl with
https://metacpan.org/pod/Dokuwiki::RPC::XML::Client in version
Release 2018-04-22a "Greebo".
Special chars on the created pages do not show up correctly on the dokuwiki even if the encoding is correct.
An additional line before
saveWikiText($id,$TEXT,$sum,$minor);[/m] in [m]RemoteAPICore.php fixed it:
526d525
< $TEXT=utf8_decode($TEXT);
I.e. it appears that
putpage[/m] still expects [m]ISO-8859-1?
This is the code to test with:
#!/usr/bin/env perl
use strict;
use 5.010;
use Data::Dumper;
use RPC::XML::Client;
use Dokuwiki::RPC::XML::Client;
my $wiki =
Dokuwiki::RPC::XML::Client -> reach
( url => 'http://127.0.0.1/dokuwiki/lib/exe/xmlrpc.php' );
my $user= <remoteuser>;
my $password=<password>;
$wiki->login( $user, $password );
say $wiki->getVersion;
my %attrs = ('sum' => 'Test putpage');
say 'putPage = ' . Dumper $wiki->putPage("test_fr", "arrière-cour crétin", {%attrs});
What is the better solution compared to the patch?