# Again on japanese input/support

## leo

Hi,

I followed the instructions posted by Kawada (thank you) to get japanese input/support working.

The problem is that, setting LANG to japanese, bash writes some messages as kanji (for example "total" when you do an "ls -l"). This is not what I want, how can I avoid it?

Thank you very much

leo

----------

## sa

you can set LANG=en_US.UTF-8 in your .bashrc

and then start kinput2 like this from your .xinitrc.

LC_CTYPE=ja_JP /usr/X11R6/bin/kinput2 -canna &

you might need to creat the utf-8 locale like this:

localedef -c -i en_US -f UTF-8 en_US.UTF-8

have fun,

sa

----------

## leo

It does work very well!

¤¢¤ê¤¬¤È ¤´¤¶¤¤¤Þ¤¹

Leo

----------

## zhenlin

EUC-JP... Shouldn't that be in UTF-8? Perhaps something is broken in iconv.

----------

## leo

1) Why did it work good in my Konqueror window and now is unreadable?

Please remember that I'm new to multi-byte localization problems...

2) There is a little problem too: I'm native italian speaker, so I need to represent accents on characters (such as è à ò). If I set the LANG=it_IT in .bashrc this does not affect programs lauched by KDE panel, which refuses to represent such characters...

How can I manage this? I only need to write some japanese in texts and mails.

Thank you very much

Leo

----------

## sa

instead of LANG=it_IT you should try LANG=it_IT.UTF-8

hopefully this helps,

sa

----------

## leo

No it does not change. Moreover I have to write

export LC_CTYPE=ja_JP

/usr/X11R6/bin/kinput2 -canna&

instead of

LC_CTYPE=ja_JP /usr/X11R6/bin/kinput2 -canna&

or it does not work.

----------

## sa

Ok, I remember something, I think you have to edit /etc/X11/app-defaults/Kinput2 and add some locales like this:

```
! X Input Method Protocol

*IMProtocol.locales: ja_JP.SJIS, ja_JP.EUC, ja_JP, japanese, japan, ja, it_IT, it_IT-UTF-8
```

all this locale stuff can drive a person crazy。

：) 一二三

----------

## Miaowara

Sa, I've heard linux doesn't support inputting SJIS. Do you know if this is true? If it is true how does one go about doing it?

----------

## sa

I'm not sure, I dont seem to have a *.SJIS locale installed.

But I would think its possible, because /etc/X11/app-defaults/Kinput2 mentions ja_JP.SJIS as one of its default IMProtocol.locales. I think you would just need to start kinput2 like "LANG=ja_JP kinput2 -canna", but have your locale as ja_JP.SJIS. 

I'll have to figure out how to get a sjis locale, then I'll get back to you.

----------

