emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: euro symbol


From: Dave Love
Subject: Re: euro symbol
Date: 04 Nov 2001 15:43:33 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.107

>>>>> "rms" == Richard Stallman <address@hidden> writes:

 rms> How will this affect encoding, and automatic coding system
 rms> recognition?

It affects encoding by unifying the relevant characters on encoding --
that's the point.  [The Emacs features is uses used to be called
`-unification-' rather than `-translation-'.]  It has no effect on
coding system recognition.  It can be used to unify on decoding,
though.

 rms>   Handa, can you comment?  If you can't get at the
 rms> sources now, we will have to wait for you to have access.

The following snippet is all there is to it.  After working out what
to do, I found that Handa had commented once that you could do this,
but I had forgotten.  I think his comment was that it probably wasn't
worthwhile; experience and user demand shows otherwise.

  (unless encode-only
    ;; Unify 8859 on decoding.  (Non-CCL coding systems only.)
    (set-char-table-parent standard-translation-table-for-decode
                           ucs-mule-8859-to-mule-unicode))
  ;; Adjust the 8859 coding systems to fragment the unified characters
  ;; on encoding.
  (dolist (n '(1 2 3 4 5 7 8 9 14 15))
    (let* ((coding-system
            (coding-system-base (intern (format "iso-8859-%d" n))))
           (table (symbol-value
                   (intern (format "ucs-8859-%d-encode-table" n))))
           (safe (coding-system-get coding-system 'safe-chars)))
      ;; Actually, the coding system's safe-chars are not normally
      ;; used after they've been registered, but we might as well
      ;; record them.  Setting the parent here is a convenience.
      (set-char-table-parent safe table)
      ;; Update the table of what encodes to what.
      (register-char-codings coding-system table)
      (coding-system-put coding-system 'translation-table-for-encode table)))

As far as I can tell, addressing this issue is the only reason most
people think they want an internal encoding based on Unicode (the
example of Mule-UCS notwithstanding).  Emacs 20 was only missing the
`char-coding-system-table' feature to be able to do this already.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]