in reply to Re^2: Text File Encoding under Windows
in thread Text File Encoding under Windows
What is the desired (or required) output encoding, i.e. which program are you using to view or further process the output? (can it handle UTF-16?)
What special characters are involved; may they also be represented in a non-unicode legacy encoding such as ISO-8859-1 (ISO-Latin1) or Windows CP1252?
Maybe just try other output encodings
open OUTPUT, ">:encoding(UTF-8)", ... open OUTPUT, ">:encoding(CP1252)", ... open OUTPUT, ">:encoding(ISO-8859-1)"... ...
The latter two should be used in combination with :encoding(UTF-16) on the input side, because that would swallow the BOM, which you don't want in non-unicode output (in case of UTF-8 the BOM is optional, so you can decide for yourself).
P.S.: can you view the original input file correctly with the same program that's showing the empty boxes with the output file? (btw, do you really mean "line" in "a line of empty boxes in every second line", or rather character "column"? — the former would be kinda strange...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Text File Encoding under Windows
by pat_mc (Pilgrim) on Mar 18, 2010 at 14:49 UTC |