unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: poppyer <poppyer@gmail.com>
To: Kenichi Handa <handa@m17n.org>
Cc: Chong Yidong <cyd@stupidchicken.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:03:58 +0800	[thread overview]
Message-ID: <ukwsabwo8x.fsf@nusnet-97-126.dynip.nus.edu.sg> (raw)
In-Reply-To: <E1Ln3lr-0002Lo-0e@etlken> (Kenichi Handa's message of "Fri, 27 Mar 2009 13:34:19 +0900")

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]


Kenichi Handa <handa@m17n.org> writes:

> 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
>
>
>> 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.
>

Yes, the gbk issue is confirmed solved in the CVS 
(after coding.c rev1.413)

But for the big5, in the list returned by 
"(detect_coding_region (region-beginning) (region-end))", 
there is not big5. I do understand that gbk and big5's sequences might
not be easy to distinguish, but in this case, both encodings are
compatible to the input literal text, so both should be in the returned list. Am
I right? Can you check with this?


BTW, is that any hook that I can put after the coding detection? I might
want to write a small lisp to distinguish BIG5 and GBK (by char statistics,
for example).


I re-attached the test_big5.txt file here.


[-- Attachment #2: test_big5.txt --]
[-- Type: text/plain, Size: 153 bytes --]

File: 08-jj_lin-street-tosk.mp3
Title:   街道                           Track: 8
Artist:  林俊傑
Album:   陸                             Year:  2008

[-- Attachment #3: Type: text/plain, Size: 57 bytes --]


Cheers,
poppyer

> ---
> Kenichi Handa
> handa@m17n.org

  parent reply	other threads:[~2009-03-27  5:03 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
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 [this message]
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=ukwsabwo8x.fsf@nusnet-97-126.dynip.nus.edu.sg \
    --to=poppyer@gmail.com \
    --cc=1654@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=handa@m17n.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).