Japanese in Emacs

Japanese in Emacs

Post by Mark McKa » Thu, 08 Mar 2001 14:46:53



I need to create a text document (HTML, actually) that contains unicode
characters coresponding to kana and kanji characters in the Japanese
language.  I can't make head or tail of Mule, and am not sure how to
either load a file or save a file containing such characters, or even
type such characers.  I'm running emacs on Win98 and have a Kanji font
installed.

Alternatively, is there a way to enter hex symbols into an HTML document
and get unicode to display?

Mark

 
 
 

Japanese in Emacs

Post by Kai Gro?joha » Thu, 08 Mar 2001 20:12:20



> I need to create a text document (HTML, actually) that contains
> unicode characters coresponding to kana and kanji characters in the
> Japanese language.  I can't make head or tail of Mule, and am not
> sure how to either load a file or save a file containing such
> characters, or even type such characers.  I'm running emacs on Win98
> and have a Kanji font installed.

You can enter Japanese characters into Emacs right out of the box,
using so-called `input methods'.  Type `C-\' to choose one.  However,
as to how to use these input methods, you'll have to look at other
documentation.

Emacs cannot save Unicode format out of the box, however.  For this
you need Mule-UCS.  It's an add-on package.  Once you have it, you can
say `C-x RET f', then choose a utf-8 or utf-16 coding system, then
save your file, and it will be in whatever encoding you chose.

If you put the string `-*- coding: utf-8; -*-' into the first line of
the file, Emacs will save in that encoding automatically.  It will
also auto-grok the format of existing files with this line.  (It tries
to even without the line, but I'm not sure how well that works.)

kai
--
Be indiscrete.  Do it continuously.

 
 
 

Japanese in Emacs

Post by Eli Zaretski » Thu, 08 Mar 2001 23:05:15




> > I need to create a text document (HTML, actually) that contains
> > unicode characters coresponding to kana and kanji characters in the
> > Japanese language.  I can't make head or tail of Mule, and am not
> > sure how to either load a file or save a file containing such
> > characters, or even type such characers.  I'm running emacs on Win98
> > and have a Kanji font installed.

> You can enter Japanese characters into Emacs right out of the box,
> using so-called `input methods'.  Type `C-\' to choose one.

C-\ only turns on or off the default input method, which is chosen by
Emacs during startup, based on the user's local settings.  Unless the OP
lives in a Japanese locale, that default will not be right for typing
Japanese.  To select an arbitrary non-default input method, you need to
type "C-u C-\".