Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
encoding issue with putpage
Avatar
Dkrioms #1
Member for 2 months · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: encoding issue with putpage
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); in RemoteAPICore.php fixed it:

526d525
<         $TEXT=utf8_decode($TEXT);

I.e. it appears that putpage still expects 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?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-09-23, 14:37:05 (UTC +02:00)