emacs-pretest-bug
[Top][All Lists]
Advanced

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

File name encoding confusion when renaming


From: Magnus Henoch
Subject: File name encoding confusion when renaming
Date: Wed, 14 Mar 2007 06:57:21 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (berkeley-unix)

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" 
"/tmp/Ã¥")
  rename-file("Ã¥" "\x8e5")
  eval((rename-file "Ã¥" "\x8e5"))
  eval-expression((rename-file "Ã¥" "\x8e5") nil)
  call-interactively(eval-expression)

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

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 22.0.93.1 (powerpc-unknown-netbsd4.99.7, X toolkit, Xaw3d scroll 
bars)
 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




reply via email to

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