unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Jay Berkenbilt <ejb@ql.org>, 3745@emacsbugs.donarmstrong.com
Subject: bug#3745: 23.0.95; emacs-23.0.95: unibyte-display-via-language-environment
Date: Fri, 03 Jul 2009 15:42:23 +0900	[thread overview]
Message-ID: <tl7d48ijmi8.fsf@m17n.org> (raw)
In-Reply-To: <20090702213958.0458148346.qww314159@soup.q.qbilt.org> (message from Jay Berkenbilt on Thu, 02 Jul 2009 21:39:58 -0400)

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





  reply	other threads:[~2009-07-03  6:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03  1:39 bug#3745: 23.0.95; emacs-23.0.95: unibyte-display-via-language-environment Jay Berkenbilt
2009-07-03  6:42 ` Kenichi Handa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 14:26 Chong Yidong
2009-07-06  0:51 ` Kenichi Handa
2009-07-06  6:50   ` Kenichi Handa
2009-07-06 14:03     ` Chong Yidong
2009-07-07  6:28       ` Kenichi Handa
2009-07-07 12:33     ` Andreas Schwab
2009-07-07 12:45       ` Kenichi Handa
2009-07-03 19:06 Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tl7d48ijmi8.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=3745@emacsbugs.donarmstrong.com \
    --cc=ejb@ql.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).