Thread From : UTF-16LE => To : UTF8
(15 answers)
Opened by etsej at 2011-03-21 16:39
Machen wir es kurz:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/perl use strict; use warnings; use Encode; open my $input, "<", "input.txt" or die "kann das Lexikon nicht öffnen: $!"; my($raw_octets,$perl_scalar,$utf8_octets); while($raw_octets = <$input>){ $perl_scalar = decode("UTF-16LE", $raw_octets); $utf8_octets = encode("utf8", $perl_scalar); print $utf8_octets; } close($input); |