unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Gibberish file names on Windows
Date: Thu, 02 Oct 2008 21:50:21 +0300	[thread overview]
Message-ID: <ur66yj0gi.fsf@gnu.org> (raw)
In-Reply-To: <xbai8wt6dgto.fsf@cam.ac.uk>

> From: Leo <sdl.web@gmail.com>
> Date: Thu, 02 Oct 2008 18:53:23 +0100
> 
> Chinese file names are displayed as gibberish for example:
> 
> 7cde~1
> b8ce~1
> d3cb~1
> f091~1
> bdea~1

Say thanks that they are displayed at all ;-)  In Emacs 22.1 and
before, you simply cannot see such files.

The Windows port of Emacs does not yet use the Unicode versions of the
filesystem APIs, it uses the so-called ``ANSI'' versions.  ANSI
versions support only non-ASCII characters native to the current
system locale.  So in any locale but the Chinese one, Emacs cannot see
files with Chinese characters, because the system call that lists
files in a directory simply returns any such characters as `?', which
is an invalid file-name character on Windows.

To avoid such a total lossage in these cases, Emacs 22.2 and later
uses the short 8+3 file name instead, which is what you see above.

Some day Emacs will begin using the Unicode APIs, at which point you
will see all the characters in any locale.  But converting Emacs to
the Unicode APIs is a formidable job, so even Emacs 23.1 will probably
not be released with it.

> They are shown correctly under w32 explorer.

The Windows Explorer on Windows XP does support the full Unicode
APIs.  But many other programs that come with Windows don't.




  reply	other threads:[~2008-10-02 18:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 17:53 Gibberish file names on Windows Leo
2008-10-02 18:50 ` Eli Zaretskii [this message]
2008-10-03  5:27   ` Leo
     [not found] <mailman.57.1222970028.25473.help-gnu-emacs@gnu.org>
2008-10-02 18:22 ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ur66yj0gi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).