diff options
author | nyamatongwe <unknown> | 2003-09-14 13:34:50 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-09-14 13:34:50 +0000 |
commit | b3e4ad264ef8258767e540c9e87ea1afb060a7ce (patch) | |
tree | dfdf3e5eed2945a4648d965069ca06b1cd885971 | |
parent | 6287f04a06452f36fc6beed9639c8ca421189743 (diff) | |
download | scintilla-mirror-b3e4ad264ef8258767e540c9e87ea1afb060a7ce.tar.gz |
Fixed bugs when converting keycodes into non-Unicode text.
iconv_open arguments reversed.
Do not mask out high byte on GTK+ 2.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 0e2240aaa..012962f30 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -942,7 +942,7 @@ int ScintillaGTK::KeyDefault(int key, int modifiers) { const char *source = CharacterSetID(vs.styles[STYLE_DEFAULT].characterSet); if (*source) { - iconv_t iconvh = iconv_open("UTF8", source); + iconv_t iconvh = iconv_open(source, "UTF8"); if (iconvh != ((iconv_t)(-1))) { char localeVal[4]="\0\0\0"; char *pin = utfVal; @@ -1681,8 +1681,10 @@ gint ScintillaGTK::KeyThis(GdkEventKey *event) { key = KeyTranslate(key); else if (IsUnicodeMode()) ; // No operation +#if GTK_MAJOR_VERSION < 2 else if ((key >= 0x100) && (key < 0x1000)) key &= 0xff; +#endif bool consumed = false; bool added = KeyDown(key, shift, ctrl, alt, &consumed) != 0; |