[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3745: 23.0.95; emacs-23.0.95: unibyte-display-via-language-environme
From: |
Kenichi Handa |
Subject: |
bug#3745: 23.0.95; emacs-23.0.95: unibyte-display-via-language-environment |
Date: |
Fri, 03 Jul 2009 15:42:23 +0900 |
In article <20090702213958.0458148346.qww314159@soup.q.qbilt.org>, Jay
Berkenbilt <ejb@ql.org> writes:
> I have this habit of editing binary files in emacs. I notice a change
> in behavior in 23.0.95 (which is the first 23 pretest I've run) relative
> to what I've seen in emacs 22. Specifically, I no longer see most
> characters in unibyte mode. I'll be specific.
> xrdb -load /dev/null
> emacs-22 -q
> M-x set-variable unibyte-display-via-language-environment RET t RET
> M-x set-language-environment RET Latin-1 RET
> M-x find-file-literally RET /bin/ls RET
> In this case, I see ^x for characters between 0 and \037, the ASCII
> character for \040-\177, \ooo for (unprintable) characters between \200
> and \237, and the ISO-Latin-1 character for \240 through \377, as
> expected.
I confirmed the bug. The problem is that
unibyte_char_to_multibyte now always returns an eight-bit
multibyte-character.
Now `charset_unibyte' is always 0 (i.e. the same as
`charset_ascii'). So, unibyte->multibyte conversion always
results in an eight-bit multibyte character.
To fix the above problem, I propose these changes for 23.1
and the trunk.
(1) Fix all codes accessing charset_unibyte
(e.g. Funibyte_char_to_multibyte) not to refer to it.
(2) Setup charset_unibyte correctly in Fset_charset_priority.
(3) Fix x_produce_glyphs to do DECODE_CHAR (charset_unibyte,
it->c) instead of unibyte_char_to_multibyte (it->c).
Those changes are surely very safe.
---
Kenichi Handa
handa@m17n.org
bug#3745: 23.0.95; emacs-23.0.95: unibyte-display-via-language-environment, Chong Yidong, 2009/07/03