in reply to convert encoding
See Encode - assuming that you have not added any decoding/encoding yet, you would decode the string on reading in and encode the string on output:
use Encode qw( decode encode ); my $str = decode('Latin-1', "Nach R\x{fc}cksprache mit"); # ... whatever # Assume that STDOUT is UTF-8: my $str_out = encode( 'UTF-8', $str ); print $str;
As you don't tell us the encoding of your input and the encoding you need in your output, it's hard to give more concrete advice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: convert encoding
by rumpumpel1 (Novice) on Feb 23, 2017 at 09:36 UTC | |
by Corion (Patriarch) on Feb 23, 2017 at 09:42 UTC | |
by rumpumpel1 (Novice) on Feb 23, 2017 at 09:54 UTC | |
by haukex (Archbishop) on Feb 23, 2017 at 10:05 UTC | |
by Corion (Patriarch) on Feb 23, 2017 at 09:59 UTC |