From 172c8ee5089ea147619c223f976e2a2c35503c46 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 16 Feb 2002 02:25:33 +0000 Subject: [PATCH] unicode --- panda/src/pgui/pgEntry.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/pgui/pgEntry.cxx b/panda/src/pgui/pgEntry.cxx index 541e35fe70..9eb837d4c0 100644 --- a/panda/src/pgui/pgEntry.cxx +++ b/panda/src/pgui/pgEntry.cxx @@ -357,7 +357,10 @@ keystroke(const MouseWatcherParameter ¶m, bool background) { // A normal visible character. Add a new character to the // text entry, if there's room. - string new_char(1, (char)keycode); + // Encode the character. This might expand it to two or + // three bytes, or it might remain a one-byte character. + TextNode *text_node = get_text_def(S_focus); + string new_char = text_node->encode_wchar(keycode); if (get_max_chars() > 0 && (int)_text.length() >= get_max_chars()) { overflow(param);