Subject: bug#15236: closed (Re: bug#7100: 24.0.50; Emacs for MS Windows cannot handle Unicode file name)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 12 Dec 2013 18:27:07 +0000

Your bug report

#7100: 24.3.50; Save file with Unicode chars in name on MS Windows replaces chars by SPCs

which was filed against the emacs,w32 package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7100: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7100
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7100: 24.0.50; Emacs for MS Windows cannot handle Unicode file name
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Thu, 12 Dec 2013 20:25:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sat, 25 Sep 2010 15:25:07 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> > From: =5ddd=5e61 =592a=4e00 <[email-masked]>( Taichi KAWABATA )
> > Date: Sat, 25 Sep 2010 16:25:07 +0900
> > Cc: 
> > 
> > As MS Windows Emacs only uses fopen(), readdir(), etc., for handling
> > file names, Emacs can not handle Unicode file names.  If Windows uses
> > CP1252, only file names with CP1252 characters can be properly displayed
> > with Emacs.  (In dired, Unicode file names will be displayed as
> > undecipherable file name that contains tilde characters.)
> 
> This is currently a missing feature in the Windows build of Emacs.
> Patches are most welcome.

Since no one stepped forward with the patches, I did it myself.

Starting with trunk revision 115490, Emacs on Windows can access file
names whose names include characters outside of the current ANSI
codepage.

Subject: 24.3.50; Save file with Unicode chars in name on MS Windows replaces chars by SPCs
From: Drew Adams <[email-masked]>
To: [email-masked]
Date: Sun, 1 Sep 2013 10:11:38 -0700 (PDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

This might be a duplicate of #7100 and #12807 - I cannot tell.  In any
case, the recipe here is different.

Whether the same bug or not, it seems like this kind of bug should be a
priority in 2013, not relegated to the wishlist since 2010.  Is it
possible that Emacs on MS Windows still cannot save files with Unicode
chars in the name?  Am I missing something?  Is this a Windows
limitation in general, perhaps?

emacs -Q

Create a new file buffer with a Unicode character, such as GREEK SMALL
LETTER LAMBDA, in the file name.  Note that the mode line of the buffer
shows the file name (buffer name) correctly, i.e., with the lambda chars.

Enter some text in the file buffer, including, for example, such a char.
Set the encoding to utf-8, to be sure.  Save the file.  The mode line
still shows the file name correctly.  All seems OK.  No error from Emacs.

But the name of the file actually created has a SPC char in place of
each GREEK SMALL LETTER LAMBDA char that should be there.  You can see
this in Dired, and if you open the file from there you can see it in the
mode line or via M-: (buffer-file-name).

Can this be fixed?  If not, how about letting the user know when s?he
saves the file that Emacs (or Windows?) has in fact changed the name?

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-08-23 on ODIEONE
Bzr revision: 113986 [email-masked]
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'