[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating a coding system
From: |
Stephen J. Turnbull |
Subject: |
Re: Creating a coding system |
Date: |
Sun, 21 Dec 2014 01:21:25 +0900 |
David Kastrup writes:
> > The translation table operates on the decoded contents.
>
> Why would something be decoded twice in a row?
Who can give a complete description? I can't, but sometimes it's
useful, just as sometimes tr(1) is useful.
> I am missing the big picture here in some manner. Does decoding not
> start from a byte stream but rather from an emacs-utf-8 encoded version
> of a byte stream?
Either (see Eli's reply). But the translation table is an add-on, not
part of the bytes-to-character coding system itself. XEmacs's coding
system stuff is quite different (don't start, I'm trying to be helpful
in lieu of a real expert), so I can't be sure, but your definition
(define-coding-system 'midi
"This converts Midi note-on events to note names"
:mnemonic ?M
:coding-type 'charset
:eol-type 'unix
:decode-translation-table 'midi-decode-table
:mime-text-unsuitable t)
doesn't match the idioms used throughout the rest of the :coding-type
'charset coding systems. Specifically, I suspect the :charset-list
property is required for anything useful to happen. Also, I suspect
:coding-type 'charset requires a unibyte charset. I'm not sure it can
be made to work for you, as your "characters" seem to be multibyte.
Try adding :charset-list '(latin-1) (or maybe '(raw-text)) to your
definition. That should just translate bytes to internal
representation of the characters with codes 0-255, and then your
translation table should DTRT. If that doesn't do the trick, you'll
have to ask Ken Handa most likely.
- Re: Creating a coding system, (continued)
- Re: Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, Eli Zaretskii, 2014/12/20
- Re: Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, Eli Zaretskii, 2014/12/20
- Re: Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, Eli Zaretskii, 2014/12/20
- Re: Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, David Kastrup, 2014/12/21
- Re: Creating a coding system, David Kastrup, 2014/12/21
- Re: Creating a coding system, Stephen J. Turnbull, 2014/12/21
- Re: Creating a coding system,
Stephen J. Turnbull <=
- Re: Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, Eli Zaretskii, 2014/12/20
- Re: Creating a coding system, David Kastrup, 2014/12/20
Re: Creating a coding system, K. Handa, 2014/12/23