module OpenOffice::OODoc fails with Unicode characters
- From: David Sudlow <invalid@xxxxxxxxxxx>
- Date: Tue, 07 Aug 2007 16:21:51 +0200
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();
.
- Follow-Ups:
- Re: module OpenOffice::OODoc fails with Unicode characters
- From: Christian Winter
- Re: module OpenOffice::OODoc fails with Unicode characters
- Prev by Date: Re: simple Perl CGI scripts help
- Next by Date: Re: Select / Case in perl
- Previous by thread: FAQ 5.34 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
- Next by thread: Re: module OpenOffice::OODoc fails with Unicode characters
- Index(es):
Relevant Pages
|