Leon Timmermans <fawaka@gmail.com> writes: > The word «some» is exactly why this is not a particularly good idea. That is why I suggested: >> use open IN => ':encoding(auto)' OUT => ':encoding(UTF-16LE+BOM)'; This can bail out elegantly (or hard) when the file does not have a BOM. One might even add a fallback to UTF-8 and bail out upon detection of invalid UTF-8 sequences. This will deal with any environment where ASCII, UTF-8 and BOM files are dominant. Which, as I assume, will be most environments in the near future. -- JohanThread Previous