Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
encoding issue with putpage
Dkrioms #1
Member since Jul 2018 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: encoding issue with putpage
We are using putpage ( thru perl with 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:

<         $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 => ''    );

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
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 22:43:45 (UTC +01:00)