[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How are etc/*.map files used?
From: |
Kenichi Handa |
Subject: |
Re: How are etc/*.map files used? |
Date: |
Sat, 13 Aug 2011 16:13:49 +0900 |
In article <address@hidden>, Eli Zaretskii <address@hidden> writes:
> The file etc/charsets/README says nothing about the intended usage of
> the *.map files in there, it just tells how to generate those files.
> Are we using these files somehow, and if so, where?
They are used to define a charset as a :map argument of
define-charset.
> I bumped into an email today that used IBM037 charset, which I
> couldn't read until I manually made a coding-system-alias for it from
> EBCDIC (which isn't quite right). But etc/charsets/IBM037.map does
> exists, so it sounds like Emacs ought to support that encoding.
Perhaps I just forgot to define a charset from that map in
mule-conf.el.
You can define the charset and the corresponding
coding-system as this:
(define-charset 'ibm037 "IBM037"
:code-space [0 255]
:map "IBM037")
(define-coding-system 'ibm037 "IBM037"
:coding-type 'charset
:mnemonic ?? ;; You must find an appropriate mnemonic letter
:charset-list '(ibm037))
Then, for instance:
(encode-coding-string "012abc" 'ibm037) => "\360\361\362\201\202\203"
---
Kenichi Handa
address@hidden