emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

detecting charset of directories


From: Dan Jacobson
Subject: detecting charset of directories
Date: Sun, 15 Oct 2006 20:47:37 +0800

One can "set coding system for the next command" to dired a mounted
CDROM directory in the proper charset (big5 in my case). But the
moment one types g to refresh the dired, the dired is back in the
default charset.

So emacs is very clever in detecting the coding systems of files, but
not very cooperative for directories full of filenames all in a
particular coding system.

One can work around this with
$ LC_ALL=.... emacs -q /cdrom

And I solved it in .emacs by wrapping this section in an and condition:

(and (string=(getenv "LANG")"zh_TW.utf8")
     (progn
       (set-language-environment "UTF-8")
       (prefer-coding-system 'utf-8-unix)
                                        ;emacs22 still need? yes.
       (set-coding-priority ;So that big5 is still guessed right after utf-8.
        (reverse ;Found these lisp thingies and it works.
         (delete-duplicates
          (reverse
           (append(list 'coding-category-utf-8
                        'coding-category-big5)coding-category-list)))))))

Anyways, hope my report helps, but I've found my workaround (probably
working around an earlier workaround), so I have no further comments,
particularly as there are too many factors at play, including
mount(8), so its off (adios) to the next bug for me.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]