in reply to Re^4: PDF::API2 printing non ascii characters
in thread PDF::API2 printing non ascii characters

Hello Anonymous Monk,

Try something like that:

#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use URI::Escape;
use feature 'say';
use Encode qw/ decode /;
binmode STDOUT, ':utf8';

sub nonDecodedUri {
    return uri_unescape( shift );
}

sub decodedUri {
    return decode 'UTF-8', uri_unescape( shift );
}

say nonDecodedUri('Hello%20%CF%89%20%E2%88%9E');
say decodedUri('Hello%20%CF%89%20%E2%88%9E');

__END__

$ perl test.pl
Hello ω ∞
Hello ω ∞

Notice the comments of fellow Monk vr on his answer above.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^6: PDF::API2 printing non ascii characters
by Anonymous Monk on Mar 14, 2018 at 09:54 UTC

    Thank you so much. Really appreciate all the solutions here :)))