Bug with 21.5.16: cannot use UTF-8 encoded file names.

Mike FABIAN mfabian at suse.de
Wed Feb 25 14:46:57 EST 2004


The following works fine with 21.4.15, but doesn't work with 21.5.16:

Run XEmacs in an UTF-8 locale, use (require 'un-define), set
all coding systems to UTF-8:

	(set-coding-priority-list (list 'utf-8))
	(set-coding-category-system 'utf-8 'utf-8)
        (if (and (<= emacs-major-version 21)
	         (<= emacs-minor-version 4))
	    (set-default-coding-systems 'utf-8)
	  ;; XEmacs 21.5 apparently renamed this function:
	  (set-default-output-coding-systems 'utf-8))

(By the way, why has 'set-default-coding-systems disappeared in
XEmacs 21.5.16?)

Now try to create a new file with some non-ASCII characters in the file name:

   C-x C-f /tmp/ä RET

Any non-ASCII character(s) will do.

Type something, save the file. Look in your filesystem, you will see
that the file-name has not been created in UTF-8 encoding.

With 21.4.15, this works fine, filenames containing German umlauts and
Japanese characters in UTF-8 encoding can easily be created like that.

Now create a file which really has an UTF-8 encoded name, for example
using an UTF-8 capable terminal:

    mfabian at magellan:/tmp$ cat abcä
    hello
    mfabian at magellan:/tmp$ locale
    LANG=ja_JP.UTF-8
    LC_CTYPE="ja_JP.UTF-8"
    LC_NUMERIC="ja_JP.UTF-8"
    LC_TIME="ja_JP.UTF-8"
    LC_COLLATE="ja_JP.UTF-8"
    LC_MONETARY="ja_JP.UTF-8"
    LC_MESSAGES="ja_JP.UTF-8"
    LC_PAPER="ja_JP.UTF-8"
    LC_NAME="ja_JP.UTF-8"
    LC_ADDRESS="ja_JP.UTF-8"
    LC_TELEPHONE="ja_JP.UTF-8"
    LC_MEASUREMENT="ja_JP.UTF-8"
    LC_IDENTIFICATION="ja_JP.UTF-8"
    LC_ALL=
    mfabian at magellan:/tmp$

And try to open this file with XEmacs. With XEmacs 21.5.16:

    C-x C-f /tmp/abcä RET

opens a *new* file! But

    C-x C-f /tmp/abc TAB RET

opens the file created from the UTF-8 capable terminal.
The tab completion expands to 

    /tmp/abcä

No such problems in 21.4.15.

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。




More information about the XEmacs-Beta mailing list