On Thu, Sep 19, 2002 at 12:35:46AM +0200, Robert Allerstorfer wrote:
>         use Encode::JP;
>         my $string = "¼¾";
>         Encode::from_to($string, "shiftjis", "utf8");
>         my $ord = join("\n", unpack('U*', $string));
>         print "$string\n$ord";
> 
> But, this gives a 3-character string "�" (with the decimal values
> 230, 164 and 156). Could anyone please point me to the right direction
> on how to get the decimal number 26908 instead?

use Encode;
my $string = "¤é¥»»y";
@codes = map ord, split //, Encode::decode(shiftjis => $string);
print "@codes"; # 26085 26412 35486

/Autrijus/

Attachment: msg01454/pgp00000.pgp
Description: PGP signature

Reply via email to