Hello,

I have a Unicode string that I would like to convert into quoted- printable encoding, but if I do:

#!/usr/bin/perl

use utf8;
use MIME::QuotedPrint;

my $unicode_string = "xxx" # where I have real Unicode string, for example Japanese characters...
$encoded = encode_qp($unicode_string);
print "qp: $encoded\n";

I get the error message:

"Wide character in subroutine entry"

If I comment out the "use utf8", I get the right result, but I need it for my script.

I tried also to convert the Unicode string to data using the code

$native_string  = pack("C*", unpack("U*", $Unicode_string));

that I found in perluniintro, but I get the error message:

"Character in 'C' format wrapped in pack"

What am I doing wrong?

Thank you very much in advance for any help.

Best regards,

Nobumi Iyanaga
Tokyo,
Japan

Reply via email to