From: Kenichi Handa <handa@m17n.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: poppyer@gmail.com, 1654@emacsbugs.donarmstrong.com
Subject: bug#1654: 23.0.60; auto encoding detection (detect-coding-region) not working
Date: Fri, 27 Mar 2009 13:34:19 +0900 [thread overview]
Message-ID: <E1Ln3lr-0002Lo-0e@etlken> (raw)
In-Reply-To: <87k56bu0uu.fsf@cyd.mit.edu> (message from Chong Yidong on Thu, 26 Mar 2009 22:59:53 -0400)
In article <87k56bu0uu.fsf@cyd.mit.edu>, Chong Yidong <cyd@stupidchicken.com> writes:
> Hi Handa-san,
> Could you take a look at bug#1654? Thanks.
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1654
Ok, but I can't reproduce the problem for test_gbk.txt.
What is shown by C-h C RET?
Gaofeng Huang wrote:
> Important settings:
[...]
> value of $LC_CTYPE: zh_CN.UTF-8
So, I installed that locale, and ran Emacs under it. The
file test_gbk.txt was correctly detected as GBK.
But, as the byte sequence pattern of GBK and Big5 is not
distinguishable, it is impossible to make Emacs detect both
files correctly at the same time.
By the way, as the file test_big5.txt is completely the same
as test_gbk.txt, I changed the encoding of test_big5.txt to
Big5 by iconv, and tested with it.
> The auto encoding detection can not detect the correct encoding (for
> example, for the two files attached). And neither the
> detect-coding-region function works (after M-x find-file-literally)
At least detect_coding_region works correctly for
test_gbk.txt. But, it doesn't work for test_big5.txt by the
same reason as above.
If you want to read Big5 file correctly, do something like
this:
C-x C-m c big5 RET C-x C-f _FILENAME_
or change the language environment to Chinese-BIG5 by:
C-x C-m l Chinese-BIG5 RET
or run Emacs under Big5 locale.
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2009-03-27 4:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 2:59 bug#1654: 23.0.60; auto encoding detection (detect-coding-region) not working Chong Yidong
2009-03-27 4:34 ` Kenichi Handa [this message]
2009-03-27 4:58 ` Chong Yidong
2009-03-27 5:20 ` poppyer
2009-03-27 7:29 ` Kenichi Handa
2009-03-27 6:02 ` Kenichi Handa
2009-03-27 5:03 ` poppyer
2009-03-27 6:55 ` Kenichi Handa
2009-03-27 7:00 ` poppyer
2009-03-27 8:52 ` poppyer
2009-03-30 1:08 ` Kenichi Handa
-- strict thread matches above, loose matches on Subject: below --
2008-12-21 8:21 Gaofeng Huang
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=E1Ln3lr-0002Lo-0e@etlken \
--to=handa@m17n.org \
--cc=1654@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.com \
--cc=poppyer@gmail.com \
/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).