in reply to Re: To decode URL-decoded UTF-8 string.
in thread To decode URL-decoded UTF-8 string.

No. I have tried that already before. It only changes %-chars to \x-ones.
  • Comment on Re^2: To decode URL-decoded UTF-8 string.

Replies are listed 'Best First'.
Re^3: To decode URL-decoded UTF-8 string.
by thanos1983 (Parson) on Aug 28, 2018 at 10:10 UTC

    Hello again nikolay,

    Then try this (it should work as expected):

    #!/usr/bin/perl
    use utf8;
    use strict;
    use warnings;
    use URI::Escape;
    use feature 'say';
    use Encode qw/ decode /;
    
    binmode STDOUT, ':utf8';
    
    sub decodedUri {
        return decode 'UTF-8', uri_unescape( shift );
    }
    
    say decodedUri('%d0%be%d0%b1/%d1%81%d1%82%d0%b5%d0%bd');
    
    __END__
    
    $ perl test.pl
    об/стен
    

    BR / Thanos

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

      Yes, this works! Thank you!

      By the way, for the DeVuan users, the package, that contains the "URI::Escape" module is called as for now "liburi-encode-perl".