igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
It contains this string: "структура".
I am lost, can't find how to do it.
I guess, I have to use pack or regex, but I don't know where to start. I don't even know, what this encoding is called, although, I saw it before many times.
And it Worked! :)my $string = "\321\201\321\202\321\200\321\203\320\272\321\202\321\203 +\321\200\320\260"; $string =~ s/\\([[:digit:]]{3})/sprintf "%c", oct($1)/ge; print $string;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to convert a string like this: "\321\201\321\202\321\200\321\203\320\272\321\202\321\203\321\200\320\260" to a proper utf8?
by Ovid (Cardinal) on Apr 28, 2016 at 06:04 UTC | |
by igoryonya (Pilgrim) on Apr 28, 2016 at 11:41 UTC | |
by igoryonya (Pilgrim) on Apr 28, 2016 at 19:25 UTC |