in reply to How to Determine a File's Character Code

I know nothing about Windows, so I am just guessing here, but to me it seems that without a file-extension notepad will use a default encoding (latin1 or utf8 or whatever) while your file uses a different encoding, which is why some characters (probably umlauts and the like appear garbled).

You can of course only guess what the proper encoding is...

One way to guess would be to open the file with different encodings and print the result, the one the "looks right" is probably the right one.

In perl you can supply the encoding to use to the open, so this approach could work:

use strict; use Encode; my @encodings = Encode->encodings; for my $encoding (@encodings) { open(my $fh, "<:encoding($encoding)", "C:/EDK") or die $!; my $content = do { local $/; <$fh>; }; print "encoding: $encoding:\n$content\n"; }