Page 1 of 1
Convert to DOS.
Posted: Wed May 13, 2009 9:36 pm
by ravilobo
When I try to see the content of file (by TYPE DOS command), every character is delimited by a space. After – converting the file to DOS – in textpad, the file looks fine.
Why does this happen?
Posted: Thu May 14, 2009 7:30 am
by ACRobin
What font are you using in TP to view the file? Make sure you are using a fixed width font like courier.
You could turn on the "Visible" icon (next to the globe) and that will show for definate if a space exists between characters.
Posted: Thu May 14, 2009 9:10 am
by ben_josephs
Your file uses the Unicode character set, UTF-16 encoded. Each character occupies 2 bytes (16 bits). Presumably, your file only contains characters that are in the 8-bit ISO 8859-1 character set (or its subset, the 7-bit ASCII character set). The Unicode and ISO 8859-1 values of these characters are the same, and so fit into a single byte; the top byte is zero, that is, a null character. TYPE doesn't recognise Unicode. and outputs the nulls as spaces.
(Note: this is a bit of a simplification.)
Posted: Thu May 14, 2009 1:44 pm
by ravilobo
Thank you Ben. That makes sense.