Go to the first, previous, next, last section, table of contents.

Kanji Handling In NEmacs 2.1

If the kanji code of articles stored in the NNTP server is different from your private file kanji code, the correct kanji code of the buffer associated with the NNTP stream must be specified using the hook nntp-server-hook as follows:

(setq nntp-server-hook
      '(lambda ()
         ;; Server's Kanji code is EUC (NEmacs hack).
         (make-local-variable 'kanji-fileio-code)
         (setq kanji-fileio-code 0)))

If you use a local news spool in stead of NNTP, the following additional hook is required to post an article in the correct kanji code in any case:

(setq gnus-Inews-article-hook
      '(lambda ()
         (save-excursion
           (set-buffer nntp-server-buffer)
           (make-local-variable 'kanji-fileio-code)
           (setq kanji-fileio-code 0)   ;EUC
           )))

The variable nntp-server-name is a buffer local variable holding a host name running an NNTP server. Use this variable to change the kanji code according to the server. The following example shows how to change the kanji code using this variable.

(setq nntp-server-hook
      '(lambda ()
         (make-local-variable 'kanji-fileio-code)
         (cond ((string-equal nntp-server-name "foo")
                (setq kanji-fileio-code 0)) ;EUC
               ((string-equal nntp-server-name "bar")
                (setq kanji-fileio-code 1)) ;Shift-JIS
               (t
                (setq kanji-fileio-code 2)) ;JIS
               )))

Go to the first, previous, next, last section, table of contents.