--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: sourcenav: Russian input is broken in all windows
- From: "Nikita V. Youshchenko" <yoush@cs.msu.su>
- Date: Wed, 25 Jun 2003 15:51:21 +0400
- Message-id: <E19V8o5-0007gP-00@zigzag.lvk.cs.msu.su>
Package: sourcenav
Version: 5.0-4.1
Severity: normal
It is not possible to enter any cyrillic letters in all Source Navigator
windows under ru_RU.KOI8-R locale.
This is a problem of many old X programs. Maybe it is fixed in newer
versions. With this version, it may be workarounded by LD_PRELOAD hack:
nikita@zigzag:/usr/local/share/snavigator> cat /usr/local/bin/snavigator
#!/bin/sh
LD_PRELOAD=/usr/local/share/snavigator/locale-bug-workaround.so
export LD_PRELOAD
exec /usr/bin/snavigator $@
nikita@zigzag:/usr/local/share/snavigator> cat locale-bug-workaround.c
#include <X11/Xlib.h>
#include <dlfcn.h>
#define OBJECT "/usr/X11R6/lib/libX11.so.6"
void * obj = 0;
int (*pXLookupString)() = 0;
int (*pXmbLookupString)() = 0;
int XLookupString(
XKeyEvent *event,
char *buffer_return,
int bytes_buffer,
KeySym *keysym_return,
Status *status_return)
{
KeySym k;
int res;
if ( !pXLookupString ) {
if ( !obj ) obj = dlopen ( OBJECT, RTLD_NOW );
pXLookupString = dlsym ( obj, "XLookupString" );
}
res = (*pXLookupString) ( event,buffer_return,bytes_buffer,&k,status_return );
if ( keysym_return ) *keysym_return=k;
if ( res==0 && k>=0x6c0 && k<=0x6ff && buffer_return && bytes_buffer>=2 ) {
buffer_return[0] = (unsigned char)(k-0x600);
buffer_return[1] = 0;
res = 1;
}
return res;
}
int XmbLookupString(
XIC ic,
XKeyPressedEvent *event,
char *buffer_return,
int bytes_buffer,
KeySym *keysym_return,
Status *status_return)
{
KeySym k;
int res;
if ( !pXmbLookupString ) {
if ( !obj ) obj = dlopen ( OBJECT, RTLD_NOW );
pXmbLookupString = dlsym ( obj, "XmbLookupString" );
}
res = (*pXmbLookupString) ( ic,event,buffer_return,bytes_buffer,&k,status_return );
if ( keysym_return ) *keysym_return=k;
if ( res==0 && k>=0x6c0 && k<=0x6ff && buffer_return && bytes_buffer>=2 ) {
buffer_return[0] = (unsigned char)(k-0x600);
buffer_return[1] = 0;
res = 1;
}
return res;
}
-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux zigzag 2.4.20 #1 þÔ× áÐÒ 10 13:44:15 MSD 2003 i686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R
Versions of packages sourcenav depends on:
ii libc6 2.3.1-17 GNU C Library: Shared libraries an
ii xlibs 4.2.1-6 X Window System client libraries
-- no debconf information
--- End Message ---