unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dired doesn't work properly with a multibyte locale
@ 2003-01-06  6:04 Miles Bader
  2003-01-11 20:00 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Miles Bader @ 2003-01-06  6:04 UTC (permalink / raw)
  Cc: emacs-devel

I'm now using a multibyte locale (LANG=ja_JP.eucJP), and dired is
screwed up: it can't properly find filenames in the directory listing.

The reason seems to be that dired uses `ls --dired', which encodes the
positions of filenames as byte-offsets into the ls output.  However, my
system's `ls' program sees the non-C LANG, and so the `total' line at the
beginning of the ls output is now a multibyte-encoded word.  Emacs decodes
this fine, but the number of characters in the decoded word is _not_ the
same as the number of bytes in the original ls output, so all the offsets
from --dired are wrong.  [note that if there are multibyte-encoded
filenames, the offsets will get screwed up further later in the listing]

It doesn't seem simple to get the byte offset information, so perhaps the
best thing to do is simply not use --dired if `file-name-coding-system' is
a multibyte encoding.  That change is simple to make in dired (and I just
manually set `dired-use-ls-dired' to nil), but I'm not sure how to tell if
a particular coding system is multibyte or not.  It'd be nice if there was
a function like `coding-system-multibyte-p'...

Thanks,

-Miles
-- 
We live, as we dream -- alone....

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2003-02-17  6:19 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-06  6:04 dired doesn't work properly with a multibyte locale Miles Bader
2003-01-11 20:00 ` Stefan Monnier
2003-01-11 20:16   ` Miles Bader
2003-01-12 11:56 ` Richard Stallman
2003-01-15 10:43 ` Kenichi Handa
2003-01-15 23:30   ` Richard Stallman
2003-01-23  4:31   ` Miles Bader
2003-01-23  6:02     ` Kenichi Handa
2003-01-23  6:12       ` Miles Bader
2003-01-25  0:49         ` Kenichi Handa
2003-01-27  4:17           ` Miles Bader
2003-01-27  5:01             ` Kenichi Handa
2003-01-27 10:58               ` Andreas Schwab
2003-01-27 11:09                 ` Kenichi Handa
2003-01-27 12:15                   ` Andreas Schwab
2003-02-03  0:17                     ` Kenichi Handa
2003-02-03  1:24                       ` Miles Bader
2003-02-03  2:11                         ` Kenichi Handa
2003-02-03  2:22                           ` Miles Bader
2003-02-03  8:40                             ` Kenichi Handa
2003-02-03  9:02                               ` Miles Bader
2003-02-03  9:10                                 ` Kenichi Handa
2003-02-03  9:22                                   ` Miles Bader
2003-02-03  9:37                                     ` Jim Meyering
2003-02-03 11:00                                   ` Andreas Schwab
2003-02-03 11:17                                     ` Kenichi Handa
2003-02-13 13:58                                       ` Dave Love
2003-02-17  6:19                                         ` Kenichi Handa
2003-02-03 17:47                           ` Dave Love
2003-02-03 17:44                         ` Dave Love
2003-02-03 18:45                           ` Michael Livshin
2003-02-03 19:13                             ` Eli Zaretskii
2003-02-03  9:37                       ` Jim Meyering
2003-02-03 17:20                       ` Richard Stallman
2003-02-03 18:53                         ` Andreas Schwab
2003-01-27 10:56             ` Andreas Schwab
2003-01-27 13:35               ` Jim Meyering
2003-01-24  5:42     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).