|
From: Renato S. <br....@gm...> - 2013-02-16 02:49:15
|
2013/2/14 John Brown <joh...@ho...> > I got that too. I did not bother to report it because I was satisfied - I > managed to make MSYS display the same output as Notepad, thanks to Erwin > Waterlander. I was also tired. And thanks for the tip about ls > --show-control-chars. > You're welcome. If encodings were like alcohol, we would certainly be all drunk. At least we have found the answer for your question. I'm not so sure anymore it's a bug, but whatever. I don't feel like filing a report in SF since my long discussion about timezone generated one to which no one seemed to take much attention. About --show-control-chars, at least I have learned something in my odyssey. I have been told by several "smart" people I was wrong, stupid, and the like, and I heard all kinds of nonsense, to the point of getting myself reading bash's source code! And everything it was all about was just a single command argument, which interestingly no one knew about. They are there in the wild, but they seem to be much more interested in beating a dead horse than really helping each other. 2013/2/15 Eli Zaretskii <el...@gn...> > > Date: Fri, 15 Feb 2013 14:13:31 -0200 From: Renato Silva < >> br....@gm...> >> Erwin, the reason why I haven't switched to ANSI in cmd.exe is because >> there are Windows programs themselves that work only with the OEM code >> page, at least in Windows 32-bits. For example, ipconfig and even cmd.exe >> itself will send CP850 bytes to Windows console even though active code >> page is 1252. >> > > Can you show some evidence to this? Don't forget that Windows itself > translates characters to produce the best output for the codepage. So what > you see might be Windows behinds the scenes, not the application. > I think I didn't recall correctly, I just can't make ipconfig specifically misbehave like that, neither in 32 nor in 64-bit edition. But I do have a test case for cmd.exe itself when used from MinTTY, as shown below. The string versão is printed correctly by cmd.exe as ANSI/Latin1, as expected by MinTTY. However, there is a message indicating the change to CP1252 as I have configured in registry, which is itself encoded as CP850. In other words, the same program in a single run prints text in different encodings, which obviously can't be guessed by MinTTY. $ /c/Windows/system32/cmd.exe Microsoft Windows [versão 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados. P gina de c¢digo ativa: 1252 C:\Users\Renato\Desktop> |