module OpenOffice::OODoc fails with Unicode characters



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();
.



Relevant Pages

  • Re: utf8 -> ascii in c language??
    ... > read line from utf8 string i can't get any thing! ... > maybe i should conversion utf8 to ascii??there is any function can ... I would recommend writing the bytes of each string out as a number and ...
    (comp.lang.c)
  • How to set the locale::global to utf8 encoding?
    ... I try to set the global locale to "utf8" to let the mbstowcs() ... function works for convert a utf8 string to an wchar_t*. ...
    (microsoft.public.vc.stl)
  • utf8 -> ascii in c language??
    ... read line from utf8 string i can't get any thing! ... maybe i should conversion utf8 to ascii??there is any function can ... conversion utf8 to ascii? ...
    (comp.lang.c)
  • utf8 -> ascii in c language??
    ... read line from utf8 string i can't get any thing! ... maybe i should conversion utf8 to ascii??there is any function can ... conversion utf8 to ascii? ...
    (comp.os.linux.misc)