rmortensen wrote:
| With TCC/LE redirection of eg. danish characters like "æ" "ø" and
| "å" does not work. If I e.g. make a DIR > TMP.TXT of a directory
| with files having those characters in there names, then I get some
| weird other characters in the TMP.TXT file. On the screen with a DIR
| command everything works just fine.
|
| How to fix this?
For internal operations MS Windows and TCC/LE use unicode character
encoding. For redirected command output the default character encoding is
your current codepage, which includes ASCII for codes 0...127, and a
font-dependent set of characters for codes 128...255. This requires mapping
16-bit Unicode characters to 8-bit characters, resulting in information
loss.
According to my reading of the TCC vs. TCC/LE comparison in the help, TCC/LE
supports unicode output. Accordingly, try starting TCC/LE with the /U
option, forcing unicode output. Alternately, you may switch between 8-bit
(normally, but incorrectly, referred to as ASCII) and unicode output using
these commands:
OPTION //UnicodeOutput=yes
OPTION //UnicodeOutput=no
I have aliases for them (but I use only TCC):
alias uni=OPTION //UnicodeOutput=yes
alias nouni=OPTION //UnicodeOutput=no
The disadvantage of always using unicode is that file sizes are doubled.
That's the penalty for having a language whose written form represent its
spoken form more closely than English (which I often refer to as a
ideogrammatic language, with each ideogram composed of the 26 letters. Can
you do otherwise when "red" and "read" can sound the same though they look
different, but "read" (present tense) and "read" (past tense) sound
different though they do look the same!
--
HTH, Steve