Gentlemen, with three plain text files of coded in my most commonly
encountered coding systems, I did this test:
$ for c in zh_CN.gb2312 zh_TW.utf8 zh_TW.big5;
do LC_CTYPE=$c LANG=$c LC_ALL=$c emacs -q gb2312 utf8 big5; done
Well, zh_CN.gb2312 guessed right each time!
With zh_TW.utf8, emacs guessed the big5 and gb files were latin-1, as
seen by the 1 in the modeline and the jumble on the screen.
With zh_TW.big5, the gb2312 file was seen jumbled as type big5.
In .emacs I can do
(set-language-environment "UTF-8")
(prefer-coding-system 'utf-8-unix)
(set-coding-priority ;So that big5 is still guessed right after utf-8.
(reverse ;Found these lisp thingies and it works.
(delete-duplicates
(reverse;no lisp pro me
(append(list 'coding-category-utf-8
'coding-category-big5)coding-category-list)))))
to detect all but gb2312 OK. What should I do, make my whole
environment CN even though I only visit those kind of files once a
week, and plan to live in UTF-8 / big5 land ... BTW, firefox guessed
right each time even though they were plain text files with no
charset= hints.