diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-18 21:06:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-18 21:06:17 (GMT) |
commit | 1d435ce1f0cd4775332957c719ee82d78bf926b7 (patch) | |
tree | 1a1f7438c3d50eee45d5d4aa863d2785dcc7470c /win/tkWinX.c | |
parent | 8fe8aab16504c4e9b91e295e0ee2a537797d0316 (diff) | |
download | tk-1d435ce1f0cd4775332957c719ee82d78bf926b7.zip tk-1d435ce1f0cd4775332957c719ee82d78bf926b7.tar.gz tk-1d435ce1f0cd4775332957c719ee82d78bf926b7.tar.bz2 |
Add support for setting InputLanguage encoding to "utf-8". I don't know if it's possible on Windows 10, but if it is, it would go terribly wrong here ...
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r-- | win/tkWinX.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c index 739712b..f445fce 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -1529,7 +1529,11 @@ UpdateInputLanguage( return; } - sprintf(codepage, "cp%d", charsetInfo.ciACP); + if (charsetInfo.ciACP == CP_UTF8) { + strcpy(codepage, "utf-8"); + } else { + sprintf(codepage, "cp%d", charsetInfo.ciACP); + } if ((encoding = Tcl_GetEncoding(NULL, codepage)) == NULL) { /* |