Mercurial > emacs
diff src/lread.c @ 111743:913b779aa4ee
Fix decoding of emacs-mule coding system.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 25 Nov 2010 12:55:14 +0900 |
parents | de58fd0baac5 |
children | 3429632cfcfb |
line wrap: on
line diff
--- a/src/lread.c Wed Oct 20 09:46:21 2010 +0900 +++ b/src/lread.c Thu Nov 25 12:55:14 2010 +0900 @@ -616,7 +616,7 @@ if (len == 2) { - charset = emacs_mule_charset[buf[0]]; + charset = CHARSET_FROM_ID (emacs_mule_charset[buf[0]]); code = buf[1] & 0x7F; } else if (len == 3) @@ -624,18 +624,18 @@ if (buf[0] == EMACS_MULE_LEADING_CODE_PRIVATE_11 || buf[0] == EMACS_MULE_LEADING_CODE_PRIVATE_12) { - charset = emacs_mule_charset[buf[1]]; + charset = CHARSET_FROM_ID (emacs_mule_charset[buf[1]]); code = buf[2] & 0x7F; } else { - charset = emacs_mule_charset[buf[0]]; + charset = CHARSET_FROM_ID (emacs_mule_charset[buf[0]]); code = ((buf[1] << 8) | buf[2]) & 0x7F7F; } } else { - charset = emacs_mule_charset[buf[1]]; + charset = CHARSET_FROM_ID (emacs_mule_charset[buf[1]]); code = ((buf[2] << 8) | buf[3]) & 0x7F7F; } c = DECODE_CHAR (charset, code);