Mailinglist Archive: opensuse-m17n (44 mails)

< Previous Next >
Re: Fwd: Re: [m17n] CJK Input
  • From: Mike Fabian <mfabian@xxxxxxx>
  • Date: Mon, 7 Jan 2002 19:23:00 +0000 (UTC)
  • Message-id: <s3tell22cd8.fsf@xxxxxxxxxxxxxxx>
ugroh@xxxxxxxxxxx (Ulrich Groh) writes:

>> Everything went well (I can LaTeX the file, see the Kanji on the screen
>> etc.).
>>
>> If I edit the file with xemacs, I only see the strange numbers like $B?
>> etc., even if I start the environment as described in the CJK-Manual.
>
> What environment?
>
> -> I did the following:
> -> export XMODIFIERS="@im=kinput2"
> -> LANG=ja_JP kinput2 -xim -kinput -canna&
> -> LANG=de_DE LC_TYPE=ja_JP xemacs
^C (a 'C' is missing here)

unless you have something in your ~/.xemacs/init.el file which
influences the priority of the guessing of the coding systems when
loading new files, XEmacs will probably guess wrong if you load a
Japanese file because you have set LANG=de_DE.

You can make XEmacs guess right for Japanese files even when
starting with the enviroment above by adding

(set-language-environment "Japanese")

to your ~/.xemacs/init.el. You can verify this by executing:

~$ LANG=de_DE LC_CTYPE=ja_JP xemacs -q --eval '(set-language-environment "Japanese")' /usr/share/doc/packages/cjk-latex/examples/Wadalab-test.tex

which will show the Japanese correctly. The same command line without
--eval '(set-language-environment "Japanese")' will lead to garbled
Japanese.

Or, you can specify the encoding explicitly when loading the file like I
explained here:

> To specify the encoding explicitly, first start XEmacs without giving
> the file name on the command line:
>
>
> ~$ xemacs
>
> then load the file using
>
> C-u C-x C-f Wadalab-test.tex RET euc-jp RET
>
> or
>
> C-x RET c euc-jp C-x C-f Wadalab-test.tex RET
>
> The first key combination works only with XEmacs, the second
> works with both XEmacs and Emacs.

Or, as a third possibility, you can add something like

% -*- coding: euc-jp -*-

into the first line of your .tex file. If (X)Emacs finds

-*- coding: foo -*-

in the first line of a file, it will load the file with the encoding
'foo' unless you override it manually with the above mentioned key
sequence.

> [...]
>
>> By the way: We can't I see the New Years Greetings in KMail ?
>>
>>
>> 新年おめでごさいま。
>
> Probably your font-settings in KMail are not suitable for Japanese, or
> you did select an unsuitable encoding to display incoming mails from
> the KMail menu. Usually, setting the encoding to "automatic" should be
> OK. If you set it to something like "iso-8859-1", you won't see
> Japanese correctly.
>
> -> "automatic" is not available.

I don't know how the German translation looks like. In Japanese, the
menu entry is '自動'. You can find this in the KMail menu at

メッセージ → エンコーディング → 自動

自動 should translate to something like 'automatisch' in German. If
you want to do it manually, one of 'eucjp', 'jis7', 'sjis' or 'utf8'
from the KMail menu should work.

> All other encodings don't work. But I can
> -> see yours Japanese writings.

Your first mail with the subject '[m17n] CJK Input]' was in
iso-2022-jp encoding (that is the same as 'jis7' from the KMail menu)
and had the correct, corresponding MIME tag in its header:

Content-Type: text/plain; charset="iso-2022-jp"

My response used the same encoding. If you can read my response,
you should be able to read your own mail with the same settings.

Your second mail with the subject 'Fwd: Re: [m17n] CJK Input' used
euc-jp encoding:

Content-Type: text/plain; charset="euc-jp"

this isn't very common for Japanese e-mail, but possible.

When you set the encoding to display mails in your KMail menu to '自動'
, 'automatisch' (or whatever the German translation is), you should
see Mails in both iso-2022-jp and euc-jp encoding correctly without
having to switch the encoding manually in the menu *if* the mails have
correct MIME headers (your mail with the subject '[m17n] CJK Input]'
had a correct MIME header).

--
Mike Fabian <mfabian@xxxxxxx> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

< Previous Next >
Follow Ups
References