andopen(my $fh, '<:raw:perlio', $qfn)
would do, but then you'd have to do CRLF translation.open(my $fh, '<', $qfn) binmode($fh);
will actually work and properly do the CRLF translation (unless you set some default layers somewhere) despite decoding and CRLF translation being done in the wrong order. Note thatopen(my $fh, '<', $qfn)
also decodes and does CRLF translation in the wrong order. That's whyopen(my $fh, '<:encoding(UTF-8)', $qfn)
doesn't work on Windows (of all places!).open(my $fh, '<:encoding(UTF-16le)', $qfn)
In reply to Re^3: What's the best way to detect character encodings, Windows-1252 v. UTF-8?
by ikegami
in thread What's the best way to detect character encodings, Windows-1252 v. UTF-8?
by Jim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |