そう言えば、Windows ネイティブの ipconfig, ping, nslookup などを mintty 上で動かしても文字化けしなくなって久しいんだけど、これいつからだっけ?
以前
でDOSプロンプト上だと
になってて驚いた時はまだ
mintty上だと
だったようなのだが、
今現在はどちらも
になってる。
の winsup/cygwin/release/ 以下探してみると
追記: 2021-06-30
これ、cmd, powershell, wsl, windows terminal でも同様だな。
「windows pseudo console "character set"」でググったら以下のような情報を見つけた。
以前
でDOSプロンプト上だと
出力\バイナリ | win32 | cygwin |
---|---|---|
CP932 | ○ | × |
UTF-8 | × | ○ |
mintty上だと
出力\バイナリ | win32 | cygwin |
---|---|---|
CP932 | × | × |
UTF-8 | ○ | ○ |
今現在はどちらも
出力\バイナリ | win32 | cygwin |
---|---|---|
CP932 | ○ | × |
UTF-8 | × | ○ |
$ grep -i mbcs *
$ grep -i utf * 2.0.0:- Fix UTF-16 surrogate handling in wctomb and friends. 2.7.0:- Fix erasing UTF-8 multibyte characters in cooked mode.
$ grep -i unicode * 1.7.21: fnmatch(3), and regcomp(3). All Unicode chars beyond U+0100 are affected. 2.11.0:- Support Unicode 10. 2.11.0:- Fix Unicode table. 3.0:- Wctype functions updated to Unicode 11.0.
$ grep -i console * 1.7.10:- The CYGWIN=tty mode using pipes to communicate with the console in a pseudo 1.7.10: tty-like mode has been removed. Either just use the normal Windows console 1.7.10:- Revamp console and pseudo tty handling. Rename /dev/ttyX to /dev/consX, 1.7.10:- Improve Ctrl-C handling in console. 1.7.11: console window from exiting. 1.7.14:- Add mouse reporting mode 1005, 1006 and 1015 to console. 1.7.14:- Allow access of /dev/conin, /dev/conout, and /dev/console if a console 1.7.14:- Fix reporting large mouse coordinates in console window mouse reporting mode. 1.7.17: console process is started in the background. 1.7.18:- Added Windows console cursor appearance support: 1.7.26: handle. Right now this excludes console windows on pre Windows 8, as well as 1.7.28:- Using gdb from a Windows console rather than a pty should no longer randomly 1.7.28:- The console buffer should no longer be cleared when the resolution of the 1.7.28: console exceeds some magic threshold. 1.7.28:- Fix inadvertent clearing of entire console buffer on clear screen. 1.7.29:- Try harder to do the right thing in the presence of console screen buffers, 2.5.0:- Enabled console reports requested by escape sequences: Requesting primary 2.5.0:- Make buffered console characters visible to select(). 2.6.0:- Handle "clear screen" escpae sequence in console window more reliable. 2.6.1:- Fix regression in console charset handling 2.7.0:- Fix handling of Alt-Numpad sequences in console handler. 2.9.0:- Fix select and read in Windows console when running under codepage 65001. 2.9.0:- Fix a clear screen issue in Windows console when running under codepage 65001. 3.1.0: 1703 or later. Add fake 24 bit color support for legacy console, 3.1.0:- Support pseudo console in PTY. Pseudo console is a new feature 3.1.0: in Windows 10 1809, which provides console APIs on virtual 3.1.0: terminal. With this patch, native console applications can work 3.1.0:- Fix select() on console in canonical mode. Return after one line is 3.1.0:- Make console I/O functions thread-safe. 3.1.2:- Fix an infinite loop in the pseudo console code. 3.1.4:- Many fixes in new pseudo console support. 3.1.5:- Fix accidental evaluation of NUL (\0) characters in xterm console output. 3.1.5: Don't move cursor to the right in case of a NUL character in the console 3.1.5:- Fix a segfault when starting, e.g., mintty from a bash in a console 3.1.5:- Make sure pseudo tty doesn't hang if cygwin-console-helper.exe is 3.2.0:- Revamped pseudo console support. Conditionally activating it only when 3.2.0:- In cygwin console, new thread which handles special keys/signals such 3.2.1:- Fix tab position evaluation after console window resize. 3.2.1:- Fix a regression in pseudo console handling, resulting in rlwrap not 3.2.1: being able to start a new pseudo console. 3.2.1:- Handle two race conditions in pseudo console usage.みたいな感じなので 3.1.0 で pseudo console と console API に対応してる辺りが怪しそうだが果たして?
$ git log cygwin-3_1_0-release -1 commit f69b2421bb385787b17aec061f538d75f272e5b9 (tag: cygwin-3_1_0-release) Author: Corinna Vinschen <corinna@vinschen.de> Date: Mon Dec 16 16:39:17 2019 +0100 Cygwin: add strtold fix to release message Signed-off-by: Corinna Vinschen <corinna@vinschen.de>なので、時期的には「20190222: Cygwin - ターミナルエミュレータと文字化け」の後なので、時系列は整合するんだけど、そんなに前からだっけ?
追記: 2021-06-30
これ、cmd, powershell, wsl, windows terminal でも同様だな。
「windows pseudo console "character set"」でググったら以下のような情報を見つけた。
- Entropymine / 2020-05-06: Win32 I/O character encoding supplement 1 – A Cygwin issue
- Microsoft / DevBlogs / Windows Command Line
- 2018-06-20: Windows Command-Line: Backgrounder
- 2018-06-27: The Evolution of the Windows Command-Line
- 2018-07-20: Inside the Windows Console
- 2018-08-02: Introducing the Windows Pseudo Console (ConPTY)
- 2018-11-15: Unicode and UTF-8 Output Text Buffer
- Microsoft / Docs / Windows / Console
- mintty / wiki
タグ
コメントをかく