You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not able to find an open or closed issue matching what I'm seeing
Setup
Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.27.0.windows.1.8.ga98b073ae2.20200618202904
cpu: x86_64
built from commit: a98b073ae2b993892641bb1eb6ce707cc673d9ad
sizeof-long: 4
sizeof-size_t: 8
Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [版本 10.0.19041.329]
What options did you set as part of the installation? Or did you choose the
defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
I installed (unzipped) the portable x64 version to `D:\Git`
Any other interesting things about your environment that might be related
to the issue you're seeing?
No
Details
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Open bash.exe directly and then bash runs in a console window
Also, the Portable Git defaults not to use Pseudo Console support. It is actually a bit obscure how to enable it (you have to create a file etc\git-bash.config containing the line MSYS=enable_pcon).
Maybe some of your environment variables have the answer to the riddle?
$ env | grep -e LANG -e TERM -e LC
LANG=en_US.UTF-8
TERM_PROGRAM=mintty
TERM_PROGRAM_VERSION=3.2.0
TERM=xterm
Sorry the MinTTY is not my test environment. I used to call bash.exe from a CMD console: press Win+R, input "cmd.exe", press Enter, input "bash.exe" in the newly opened window and press Enter again. Or you can double click "usr\bin\bash.exe" in the file explorer.
I did apply my customized /etc folder when testing the bare msys-2.0.dll and bash.exe, but I think it doesn't affect the conclusion.
During my test, I added a line of fopen/fprintf/fclose to the call to SetConsoleTitleW in /usr/src/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/cygwin/fhandler_console.cc#set_console_title, and no log files were created. Therefore I think this is because of the new APIs of Win10's console.
gdh1995
changed the title
v2.27.0 can now show Chinese characters on the console window's title
v2.27.0 cannot show Chinese characters on the console window's title
Aug 11, 2020
A [bug](git-for-windows/git#2738) preventing
Unicode characters from being used in the window title of Git Bash
was fixed.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Setup
defaults?
to the issue you're seeing?
No
Details
Open
bash.exe
directly and then bash runs in a console windowMinimal, Complete, and Verifiable example
this will help us understand the issue.
The console window should update the text on its title bar into "
123 测试
" (3 English numbers and 2 Chinese characters)The "
测试
" was converted into a mess (it seemed it was using a wrong coding page)URL to that repository to help us with testing?
No repo related.
Further tests
MSYS2-packages
as I once did in MinTTY crashes frequently with a Git Bash using Windows-native pseudo consoles #2687, and this issue is reproducedmsys-2.0.dll
andbash.exe
, and this issue occurs thereCode analysis
iconv.exe
can be used to work it around: the code below can make the title show Chinese characters as expected.This means my console accepts Chinese characters in the
GBK
encoding, but the msys2 runtime sent the UTF-8 version.I think this is a bug of msys2 runtime, and it should do similar conversions as it has done when outputting characters to the console.
The text was updated successfully, but these errors were encountered: