Subject: bug#12807: 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:06 +0000

Your bug report

#7100: 24.2; Emacs cannot edit file with funny Unicode characters in the file name on Windows

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.2; Emacs cannot edit file with funny Unicode characters in the file name on Windows
From: Nils Gösche <[email-masked]>
To: [email-masked]
Date: Mon, 05 Nov 2012 21:52:05 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear Sirs,

I keep a bunch of text files on my Windows 7 desktop containing my thoughts
about the solutions of chess problems I am trying to solve. Now, one of these
problems was composed by a Russian. So, I named the file Кузовков_Lösung.txt:
First the name of the Russian composer, then the German word for »solution«.
However, when I tried to edit that file in Emacs, I only got error messages,
probably because of the funny Unicode characters in the file name. (See below
for the exact wording of the messages.)

Another file with only English/German characters in the name,
Thorton_Lösung.txt, does not cause any trouble at all (oh, but it seems I
misspelled the name, actually).

(BTW, Notepad does not have any problems editing the same file. So, it is
not some weird, OS-related problem, either).

Regards,
Nils Gösche

======== End of bug report======

In GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601)
 of 2012-08-29 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.6) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_US
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: DEU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> C-x 
C-f d e s k <tab> K u s o w k o w _ L ö s u n g . t 
x t C-g <help-echo> <down-mouse-1> <mouse-1> C-x C-f 
K u <backspace> <backspace> d e s k <tab> K u s o w 
k o s <backspace> w _ L ö s u n g . t x t <return> 
b l a r k <return> C-x C-s C-x k <return> C-z <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> d x f o i p g d 
o j g <return> C-x C-s <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> C-x k <return> y e s <return> C-z <down-mouse-1> 
<mouse-1> <return> C-x C-s <backspace> C-x C-s C-x 
k <return> C-z C-x k <return> C-z <down-mouse-1> <mouse-1> 
C-x k <return> C-z C-x C-f d e s k <tab> k <tab> <backspace> 
<tab> <tab> <down-mouse-1> <mouse-2> <end> F a r k 
. <return> C-x C-s C-x k <return> y e s <return> C-z 
M-x M-x C-g M-x r e p o r <tab> <return>

Recent messages:
Wrote c:/Users/cartan/Desktop/Thorton_Lösung.txt
Saving file c:/Users/cartan/Desktop/Thorton_Lösung.txt...
Wrote c:/Users/cartan/Desktop/Thorton_Lösung.txt
(New file) [2 times]
Making completion list...
Mark set
Saving file c:/Users/cartan/Desktop/????????_Lösung.txt...
basic-save-buffer-2: Opening output file: invalid argument, c:/Users/cartan/Desktop/????????_Lösung.txt
completing-read-default: Command attempted to use minibuffer while in minibuffer
Quit
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils help-mode easymenu view eliserv doctor server time cl time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp
w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)