[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: File name encoding confusion when renaming]

From: Richard Stallman
Subject: address@hidden: File name encoding confusion when renaming]
Date: Wed, 14 Mar 2007 21:39:24 -0400

Can someone please DTRT and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
        autolearn=failed version=3.1.0
From: Magnus Henoch <address@hidden>
To: address@hidden
Jabber-Id: address@hidden
Date: Wed, 14 Mar 2007 06:57:21 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Subject: File name encoding confusion when renaming

I'm using a UTF-8 locale, and want my files to have UTF-8 filenames,
but some of them have Latin-1 names.  For the purpose of bug
reproduction, such a file can be created with:

echo foo > $(printf '\345')

That is, the file's name is "å" in Latin-1.

I want to rename this file to the same name in UTF-8:

M-: (rename-file "\345" "å")

This fails with:

Debugger entered--Lisp error: (file-already-exists "File already exists" 
  rename-file("Ã¥" "\x8e5")
  eval((rename-file "Ã¥" "\x8e5"))
  eval-expression((rename-file "Ã¥" "\x8e5") nil)

However, if I set the OK-IF-ALREADY-EXISTS argument to t, renaming

M-: (rename-file "\345" "å" t)

Also, renaming the file to anything else succeeds.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/22.0.93/etc/DEBUG for instructions.

In GNU Emacs (powerpc-unknown-netbsd4.99.7, X toolkit, Xaw3d scroll 
 of 2007-02-08 on zemdatav
X server distributor `The XFree86 Project, Inc', version 11.0.40500000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: sv
  value of $LC_MONETARY: sv_SE
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  display-time-mode: t
  jabber-activity-mode: t
  jabber-mode-line-mode: t
  iswitchb-mode: t
  icomplete-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
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <s-down> <s-down> 
<s-down> <s-down> <s-down> <s-down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <up> <s-up> <s-up> <s-up> <s-up> <s-up> 
<s-up> <s-up> <s-up> <s-up> <s-up> <s-up> <right> <right> 
<right> C-u C-SPC <right> <right> <right> <right> <right> 
<right> <right> M-x r e p o SPC r t <return>

Recent messages:
mouse-2, RET: find function's definition
Loading jka-compr...done
uncompressing dired-aux.el.gz...done
Note: file is write protected
Magnus Rutgersson is now Online
Mark saved where search started
Making completion list...
Loading emacsbug...done

emacs-pretest-bug mailing list
------- End of forwarded message -------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]