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?
Convert to DOS.
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
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.)
(Note: this is a bit of a simplification.)