• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6142: Too many arguments for Encode::decode_utf8 at WysiwygPlugin.pm line 621, near "Encode::FB_PERLQQ)"

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension WysiwygPlugin Normal Closed   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Wysiwig was buggy in 4.2.0 on this same system, now it is broken completely. The plugin does not load at all.

The error

We get this error in InstalledPlugins page, =data/log<date>.txt files, and so on.

TWiki::Plugins::WysiwygPlugin could not be loaded.  Errors were: 
Too many arguments for Encode::decode_utf8 at /my/path/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 621, near "Encode::FB_PERLQQ)"
BEGIN not safe after errors--compilation aborted at /my/path/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 665.
Compilation failed in require at (eval 64) line 1.
BEGIN failed--compilation aborted at (eval 64) line 1.

Wysiwyg deps met

The dependencies listed here


indicate HTML::Parser >=3.28 and HTML::Entities >=1.25 are the only ones.

Our system has that.

$ grep '\$VERSION =' Parser.pm
$VERSION = '3.35';  # $Date: 2008/12/08 23:57:47 $
$ grep '\$Id:' Entities.pm
# $Id: Item6142.txt,v 1.7 2008/12/08 23:57:47 JefferyMartin Exp $

TWiki Perl reqs met

This page:


indicates that Perl 5.8.x is required for this version of TWiki.

We have that, also.

$ perl -v

This is perl, v5.8.2 built for aix-thread-multi

AIX version

FYI, for any AIX user stumbling upon this post, our AIX version is 5.3 ML 6.

$ oslevel -r

Taking a quick look at line 621

Here is the line in twiki/lib/TWiki/Plugins/WysiwygPlugin.pm.

    621     $text = Encode::decode_utf8($text, Encode::FB_PERLQQ);

That all seems to match up with the function call in the local perl docs.

$ perldoc Encode
            $string = decode_utf8($octets [, CHECK]);
            equivalent to "$string = decode("utf8", $octets [,
            CHECK])".  The sequence of octets represented by $octets
            is decoded from UTF-8 into a sequence of logical

$ perldoc Encode
          perlqq mode (CHECK = Encode::FB_PERLQQ)
          HTML charref mode (CHECK = Encode::FB_HTMLCREF)
          XML charref mode (CHECK = Encode::FB_XMLCREF)
            For encodings that are implemented by Encode::XS, CHECK ==
            Encode::FB_PERLQQ turns (en|de)code into "perlqq" fallback

From what I can tell from the above docs, you are calling the function OK.

My Encode.pm version

Our version of Encode.pm is:

$ grep '\$Id:' Encode.pm
# $Id: Item6142.txt,v 1.7 2008/12/08 23:57:47 JefferyMartin Exp $

Is this high enough?

Sample code gets same error

I've distilled that line all by itself, and AIX's perl still complains.

$ cat 1.pl
#!/usr/bin/perl -w

use strict;

use Encode;

my ($text) = @ARGV;

$text = Encode::decode_utf8($text, Encode::FB_PERLQQ);

print $text;

exit 66;

$ ./1.pl This is a sentence.
Too many arguments for Encode::decode_utf8 at ./1.pl line 9, near "Encode::FB_PERLQQ)"
Execution of ./1.pl aborted due to compilation errors.

Looking at Linux Perl

Sure enough, the same line seems to work on Linux (RHEL 4, in this case) in perl 5.8.5.

$ ./1.pl 'This is a sentence.'
This is a sentence.
$ cat 1.pl
#!/usr/bin/perl -w

use strict;

use Encode;

my ($text) = @ARGV;

$text = Encode::decode_utf8($text, Encode::FB_PERLQQ);

print $text;

exit 66;

$ perl --version

This is perl, v5.8.5 built for x86_64-linux-thread-multi

$ uname -a
Linux mybox 2.6.9-78.0.1.ELsmp #1 SMP Tue Jul 22 18:01:05 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

So is the problem the Perl version difference (5.8.2 vs 5.8.5)? Or is it a problem with AIX's Perl implementation?

-- TWiki:Main.JefferyMartin - 04 Dec 2008


I installed Perl 5.10 from sources in an alternate directory. I left the system Perl alone.

The system Perl (5.8.2) simply will not allow the Wysiwyg plugin to load.


I had exactly the same error message on an older Linux box. After upgrading all required and recommended CPAN modules and adding Encode, the WYSIWYG editor worked properly.

-- TWiki:Main.PeterThoeny - 04 Dec 2008

Peter, do you think perhaps the TWiki system requirements page needs to be modifed to indicate that Wysiwyg does not work on Perl < 5.8.5 or perhaps the Wysiwyg plugin info section needs to be modified?

-- TWiki:Main.JefferyMartin - 04 Dec 2008

I have it running properly on Perl 5.8.0. In system requirements, I think the stated Perl version is OK, but we need to add the dependency on the CPAN Encode module on the system requirements page and WysiwygPlugin page.

This dependency seems to be a recent addition since my test installation worked before.

-- TWiki:Main.PeterThoeny - 05 Dec 2008

I added that the Encode module to TWiki system requirements page. I added it to Wysiwyg plugin info section, also.

-- TWiki:Main.JefferyMartin - 08 Dec 2008

Summary Too many arguments for Encode::decode_utf8 at WysiwygPlugin.pm line 621, near "Encode::FB_PERLQQ)"
ReportedBy TWiki:Main.JefferyMartin
Codebase 4.2.3
SVN Range TWiki-5.0.0, Wed, 22 Oct 2008, build 17677
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState Closed


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-12-08 - JefferyMartin
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback