GNU bug report logs -
#4157
[macOS/HFS] dired doesn't decode ls output when it uses different encoding for filename vs date
Previous Next
Reported by: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Date: Sun, 16 Aug 2009 02:25:05 UTC
Severity: minor
Tags: notabug
Found in versions 27.0.50, 23.1.50
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
In article <14A765B4-9EAF-46AC-BEBC-6B0A664BA03A <at> Freenet.DE>, Peter Dyballa <Peter_Dyballa <at> Freenet.DE> writes:
> > Please show the value of default-file-name-coding-system and
> > file-name-coding-system.
> >
> I (seem to) see: it's utf-8 for the first and nil for the second
> variable (the same as globally). So the string M\344r, coming from
> some ls which follows LC_CTYPE or LANG, is interpreted as being UTF-8
> which it of course isn't...
Ah, I found this code in mule-cmds.el.
(if (eq system-type 'darwin)
;; The file-name coding system on Darwin systems is always utf-8.
(setq default-file-name-coding-system 'utf-8)
I don't remember why that code exists. If the comment is
wrong (i.e. there's no need of treating darwin specially
here), the attached patch should solve the problem. Please
try it.
---
Kenichi Handa
handa <at> m17n.org
--- mule-cmds.el.~1.364.~ 2009-08-13 20:59:18.000000000 +0900
+++ mule-cmds.el 2009-08-19 09:21:33.000000000 +0900
@@ -355,13 +355,10 @@
(or (local-variable-p 'buffer-file-coding-system buffer)
(ucs-set-table-for-input buffer))))
- (if (eq system-type 'darwin)
- ;; The file-name coding system on Darwin systems is always utf-8.
- (setq default-file-name-coding-system 'utf-8)
- (if (and default-enable-multibyte-characters
- (or (not coding-system)
- (coding-system-get coding-system 'ascii-compatible-p)))
- (setq default-file-name-coding-system coding-system)))
+ (if (and default-enable-multibyte-characters
+ (or (not coding-system)
+ (coding-system-get coding-system 'ascii-compatible-p)))
+ (setq default-file-name-coding-system coding-system))
(setq default-terminal-coding-system coding-system)
(setq default-keyboard-coding-system coding-system)
;; Preserve eol-type from existing default-process-coding-systems.
This bug report was last modified 5 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.