in reply to To decode URL-decoded UTF-8 string.
Hello nikolay,
Is this working for you?
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
use URI::Escape;
binmode STDOUT, ":utf8";
my $in = "%d0%be%d0%b1/%d1%81%d1%82%d0%b5%d0%bd";
my $text = Encode::decode('utf8', uri_unescape($in));
print $text . "\n";
__END__
$ perl test.pl
об/стен
Update: Some time ago there was a similar question PDF::API2 printing non ascii characters. Although the tittle is not the same check it out it will help to review some information.
Looking forward to your reply, BR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: To decode URL-decoded UTF-8 string.
by nikolay (Beadle) on Aug 28, 2018 at 10:06 UTC | |
by thanos1983 (Parson) on Aug 28, 2018 at 10:10 UTC | |
by nikolay (Beadle) on Aug 28, 2018 at 12:03 UTC |