[mew-int 01221] Re: iso-8859-15 (aka Latin-0 or Latin-9)
Tatsuya Kinoshita
tats at example.com
Thu Dec 12 21:04:57 JST 2002
On December 10, 2002, [mew-int 01208],
Kazu Yamamoto <kazu at example.com> wrote:
> Q1) Reading: Is it enough to display both Latin 1 and Latin 0 with X
> windows system? Or are you using multi-lingual terminal? If so,
> what kind of character set (excluding UTF-8) can display both
> Latin 1 and Latin 0 at the same time?
If (set-terminal-coding-system 'ctext) is used in Emacs on mlterm
(http://mlterm.sourceforge.net/), Latin-1's CURRENCY SIGN and
Latin-9's EURO SIGN are displayed at the same time.
> Q2) Writing: In a draft, how do you want to select input-method?
> Suppose that you are usually using Latin 1. But this time you want
> to input the euro sign. What kind of user interface should be
> provided to change the default input-method? Or is there any
> input-method to input all characters defined both in Latin 1 and
> Latin 0?
>
> Q3) Replying1: You may want to select input method according to the
> message to be replied. For example, if the message to be replied
> is encoded with Latin 0, an input method for Latin 0 should be
> selected automatically. To implement this, is the following
> configuration enough?
>
> (setq mew-charset-input-method-alist
> '(("iso-8859-1" . "latin-1-postfix")
> ("iso-8859-2" . "latin-2-postfix")
> ("iso-8859-15" . "latin-9-postfix")))
I have no idea about input method for Mew. I'm satisfied with
the set-input-method and quoted-insert provided by Emacs.
> Q4) Replying2: You are replying to a Latin 1 message, however you
> input the euro sign. In this situation, both Latin 0 and Latin 1
> characters exist in a draft. I think Latin 1 characters should be
> converted into Latin 0, vise versa. What kind of user interface
> should be provided? e.g. Warning to the user and asking which
> character set should be used.
I feel that a warning message of iso-8859-1/15 conversion is
unnecessary.
However, I want a warning message if Mew uses iso-8859-x or
utf-8, because I don't normally use it. I normally use
us-ascii or iso-2022-jp.
I'm using the `my-mew-charset-ask' function in my ~/.mew.el.
See below.
----
(setq my-mew-noask-charset-list '("us-ascii" "iso-2022-jp"))
(add-hook 'mew-send-hook 'my-mew-charset-ask)
(add-hook 'mew-post-hook 'my-mew-charset-ask)
(defun my-mew-charset-ask ()
(interactive)
(run-hooks 'my-mew-charset-ask-hook)
(let ((chset (my-mew-body-charset)))
(if (and (mew-coding-system-p (mew-charset-to-cs chset))
(not (member chset my-mew-noask-charset-list)))
(if (not (y-or-n-p (format "Do you really use %s? " chset)))
(error "Edit body!")))))
(defun my-mew-body-charset ()
(interactive)
(let (char)
(if (mew-attach-p)
(setq char (mew-syntax-get-param
(mew-syntax-get-ct
(mew-syntax-get-entry mew-encode-syntax '(1)))
"charset")))
(or char
(mew-charset-guess-region (my-mew-body-min) (my-mew-body-max)))))
(defun my-mew-body-min ()
(interactive)
(save-excursion
(mew-header-goto-body)
(point)))
(defun my-mew-body-max ()
(interactive)
(save-excursion
(if (not (mew-attach-p))
(point-max)
(mew-attach-move-onto-body)
(point))))
----
--
Tatsuya Kinoshita
More information about the Mew-int
mailing list