http://bugs.winehq.org/show_bug.cgi?id=5761
------- Additional Comments From davidl@lmert.com 2007-18-04 18:11 ------- Yes, this is still a problem in 0.9.32 and 0.9.43.
Actually, Wine's "CMD.EXE" works all right in an 8-bit locale such as "LANG=en_US.iso88591". The difference in file-lengths in that case is caused by an extra space (0x20) charachter.
However, the problem shows up with a Unicode terminal (such as uxterm) and a Unicode locale (such as "LANG=en_US.utf8"). Here's a simplified version of the problem; "A" represents a non-ASCII character, "@" represents a blank spot or special symbol (depending on font) because of an invalid UTF-8 sequence, and "XX" represents two characters that are the LATIN-1 glyphs for the parts of a UTF-8 character:
bash> echo bA >bA bash> wine CMD.EXE cmd> echo xA >xA cmd> dir /w [.] [..] b@ xA cmd> exit bash> ls bA xXX
The files that should be "bA" and "xA", respectively, contain the UTF-8 text "bA\n" and "xA \n" (the first is 4 bytes long if the character A fits in two bytes, and the second is 5 bytes long).