Skip to content

Kb/msys/unicode console input #41

Merged
merged 7 commits into from Sep 13, 2013

4 participants

@kblees
kblees commented Jul 5, 2012

These patches should fix the Unicode line editing issues in msys bash for most users (see http://groups.google.com/group/msysgit/browse_thread/thread/f365e1c841beef62 ).

The major part of the patch series was backporting the multibyte to wide char conversion functions from newlib 1.20 / cygwin 1.7 to the current msys.dll (based on newlib 1.9), so that bash could be compiled with multibyte support.

I'll send another pull request for the devel branch (binaries only).

Cheers,
Karsten

kblees added some commits Feb 7, 2012
@kblees kblees Updated msys-1.0.dll to MSYS-g7ebac74
Signed-off-by: Karsten Blees <blees@dcon.de>
3a8b372
@kblees kblees msys.dll: support Unicode console input and multibyte conversion func…
…tions

Add support for Unicode console input and backport multibyte / wide char
conversion functions from newlib 1.20 (needed by bash for Unicode-aware
line editing).

Signed-off-by: Karsten Blees <blees@dcon.de>
fafd0dc
@kblees kblees Update msys build environment for multibyte conversion functions
Copy newlib header files to the msys include directory, update msys.dll
import library.

Signed-off-by: Karsten Blees <blees@dcon.de>
83e5bda
@kblees kblees Updated msys-1.0.dll to MSYS-gd046b81
Signed-off-by: Karsten Blees <blees@dcon.de>
d718aa7
@kblees kblees bash: enable multibyte support (Unicode line editing)
Enable multibyte support in the bash release script and fix a small compile
error in the bash multibyte code.

Signed-off-by: Karsten Blees <blees@dcon.de>
ee8f87b
@kblees kblees Updated bash.exe to MSYS-gd046b81
Signed-off-by: Karsten Blees <blees@dcon.de>
6b01aae
@kblees kblees Update bash/readline settings for Unicode line editing
Enable multibyte character on input and output and disable ASCII conversion
in etc/inputrc.

Signed-off-by: Karsten Blees <blees@dcon.de>
93300d9
@kblees
kblees commented Jul 6, 2012

Sorry I forgot to clarify the 'most' in 'most users'.

The console input code in fhandler_console::read currently doesn't decode UTF-16 surrogate pairs (> \u0ffff, e.g. CJK extensions). I couldn't find any hint on how ReadConsoleInputW transmits these (not even in cygwin's fhandler_console), and as I have no way to test this either, I'd like to leave this one to CJK users who actually have that problem.

@stevenkling

Want!

@sschuberth
MSysGit - the development behind Git for Windows member

@stevenkling So if you want this, you could help by

1) reviewing the code,
2) applying it to your local clone,
3) building Git for Windows and verify that it works as expected,
4) report back here.

@patthoyts patthoyts merged commit 93300d9 into msysgit:msys Sep 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.