[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating a coding system
From: |
Andreas Schwab |
Subject: |
Re: Creating a coding system |
Date: |
Sat, 20 Dec 2014 17:11:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Andreas Schwab <address@hidden> writes:
>
>> David Kastrup <address@hidden> writes:
>>
>>> Ok, what am I doing wrong here? Why does decode-coding-string not do
>>> anything here?
>>>
>>> (define-translation-table 'midi-decode-table
>>> (make-translation-table-from-alist
>>> (mapcar
>>> (lambda (p)
>>> (cons (car p) (string-to-vector (cdr p))))
>>> '(([144 0] . "c,,,,")
>>
>> The translation table operates on the decoded contents.
>
> Why would something be decoded twice in a row?
During decoding, the translation table's translations are applied to
the characters that result from ordinary decoding. If a coding system
During encoding, the translation table's translations are applied to
the characters in the buffer, and the result of translation is actually
encoded. If a coding system has property `:encode-translation-table',
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Creating a coding system, David Kastrup, 2014/12/20
- Re: Creating a coding system, Thien-Thi Nguyen, 2014/12/20
- Re: Creating a coding system, Andreas Schwab, 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, Thien-Thi Nguyen, 2014/12/20
- Re: Creating a coding system,
Andreas Schwab <=
- Re: Creating a coding system, Andreas Schwab, 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, Stephen J. Turnbull, 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