D
David Sudlow
When I try to write out a utf8 string using extendText(),
appendParagraph or other methods with the OpenOffice::OODoc module, I
get the following error:
Cannot decode string with wide characters at C:/Perl/lib/Encode.pm line 162.
I have the localEncoding set to utf8 as I should and it reads in fine
from an office document containing utf8 characters.
Here is a short but complete script that illustrates the issue:
use strict;
use warnings;
use OpenOffice::OODoc;
ooLocalEncoding('utf8');
my $archive = OpenOffice::OODoc::File->new(
"my_document.odt",
create => "text");
my $text = ooDocument(
archive => $archive,
member => 'content'
);
$text->appendParagraph(text => "hello\x{100}");
$archive->save();
appendParagraph or other methods with the OpenOffice::OODoc module, I
get the following error:
Cannot decode string with wide characters at C:/Perl/lib/Encode.pm line 162.
I have the localEncoding set to utf8 as I should and it reads in fine
from an office document containing utf8 characters.
Here is a short but complete script that illustrates the issue:
use strict;
use warnings;
use OpenOffice::OODoc;
ooLocalEncoding('utf8');
my $archive = OpenOffice::OODoc::File->new(
"my_document.odt",
create => "text");
my $text = ooDocument(
archive => $archive,
member => 'content'
);
$text->appendParagraph(text => "hello\x{100}");
$archive->save();