Japanese input.
authorshort <>
Mon, 9 May 2005 01:05:43 +0000 (01:05 +0000)
committershort <>
Mon, 9 May 2005 01:05:43 +0000 (01:05 +0000)
bin/run-im-ja [new file with mode: 0755]

diff --git a/bin/run-im-ja b/bin/run-im-ja
new file mode 100755 (executable)
index 0000000..8008eef
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/bash
+#
+# $Id$
+
+# Use: LC_CTYPE='ja_JP.UTF-8' XMODIFIERS='@im=kinput2' galeon
+# Do not: grep -qw 00000000:DD39 /proc/net/tcp
+# as 0xDD39 is not stable.
+# Do not: grep --binary-files=binary -qw /tmp/.iroha_unix/IROHA /proc/net/unix
+# Use: grep --binary-files=binary -qw /tmp/.ki2-unix/_0-ja_JP /proc/net/unix || (kinput2-canna &)
+# For OpenOffice (LC_MESSAGES is mandatory) use:
+# run-kinput2 LC_MESSAGES LC_COLLATE openoffice
+# FIXME: still valid for run-im-ja?
+
+val='ja_JP.UTF-8'
+# XIM_PROGRAM=canna LANG=ja_JP.UTF-8 GTK_IM_MODULE=xim XMODIFIERS=@im=im-ja-xim-server
+export LC_CTYPE="$val"
+export XMODIFIERS='@im=kinput2'
+# Re-set LANG+LANGUAGE for OpenOffice
+export LANG=en_US.UTF-8
+unset LANGUAGE
+while true;do
+       first="$1"
+       shift
+       if test 1 = 1 \
+               -a "${first#LC_}"  = "$first" \
+               -a "${first#LANG}" = "$first" \
+               ;then break;fi
+       eval "$first='$val'"
+       export $first
+done
+if [ "$first $*" != "exec " ];then
+       exec "$first" "$@"
+       echo >&2 NOTREACHED
+       exit 1
+fi