diff options
author | nyamatongwe <devnull@localhost> | 2003-09-14 13:34:50 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2003-09-14 13:34:50 +0000 |
commit | 6c4a869cd5937b82b19255a48ad030cac535835e (patch) | |
tree | dfdf3e5eed2945a4648d965069ca06b1cd885971 | |
parent | 7d23d8e756aa3f514ed32e9708fe6ac0b96860d4 (diff) | |
download | scintilla-mirror-6c4a869cd5937b82b19255a48ad030cac535835e.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; |