Kenichi Handa writes: > In article <87k56bu0uu.fsf@cyd.mit.edu>, Chong Yidong 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.