diff options
Diffstat (limited to 'xc/lib/X11/imThaiIm.c')
-rw-r--r-- | xc/lib/X11/imThaiIm.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/xc/lib/X11/imThaiIm.c b/xc/lib/X11/imThaiIm.c index 3bdd5b8b9..e21bfa7b2 100644 --- a/xc/lib/X11/imThaiIm.c +++ b/xc/lib/X11/imThaiIm.c @@ -32,7 +32,7 @@ THIS SOFTWARE. frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.5 2000/11/28 18:49:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.6 2000/12/04 18:49:24 dawes Exp $ */ #include <stdio.h> #include <X11/Xlib.h> @@ -124,7 +124,11 @@ _XimThaiOpenIM(im) if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNChar))) goto Open_Error; - private->ucs_conv = conv; + private->ucstoc_conv = conv; + + if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNUtf8String))) + goto Open_Error; + private->ucstoutf8_conv = conv; im->methods = &Xim_im_thai_methods; private->current_ic = (XIC)NULL; @@ -196,6 +200,14 @@ _XimThaiIMFree(im) _XlcCloseConverter(im->private.local.cstoutf8_conv); im->private.local.cstoutf8_conv = NULL; } + if (im->private.local.ucstoc_conv) { + _XlcCloseConverter(im->private.local.ucstoc_conv); + im->private.local.ucstoc_conv = NULL; + } + if (im->private.local.ucstoutf8_conv) { + _XlcCloseConverter(im->private.local.ucstoutf8_conv); + im->private.local.ucstoutf8_conv = NULL; + } return; } |