summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-18 21:06:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-05-18 21:06:17 (GMT)
commit1d435ce1f0cd4775332957c719ee82d78bf926b7 (patch)
tree1a1f7438c3d50eee45d5d4aa863d2785dcc7470c /win/tkWinX.c
parent8fe8aab16504c4e9b91e295e0ee2a537797d0316 (diff)
downloadtk-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.c6
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) {
/*