Frage

I want my default encoding stay utf-8.
But when under Windows - I want to see some of my file names in dired using cp1251. (Because of no utf support in Windows)

Everything displays like: \361\345\354

So how can I make this:

(setq coding-system-for-read 'cp1251)

only for dired mode but not others?

War es hilfreich?

Lösung

You can try this:

(add-hook 'dired-mode-hook
          (lambda ()
            (make-local-variable 'coding-system-for-read)
            (setq coding-system-for-read 'cp1251)))
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top