[Top][All Lists]

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

Unicode Normalization on Mac OS X (HFS+ filesystem)

From: Stephan Kleisinger
Subject: Unicode Normalization on Mac OS X (HFS+ filesystem)
Date: Thu, 5 Jun 2008 16:30:07 +0200

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: darwin9.3.0
Compiler: /usr/bin/gcc-4.0
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' - DCONF_OSTYPE='darwin9.3.0' -DCONF_MACHTYPE='i386-apple-darwin9.3.0' - DCONF_VENDOR='apple' -DLOCALEDIR='/opt/local/share/locale' - DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I. -I./ include -I./lib -I/opt/local/include -O2 uname output: Darwin cicero.lan 9.3.0 Darwin Kernel Version 9.3.0: Fri May 23 00:49:16 PDT 2008; root:xnu-1228.5.18~1/RELEASE_I386 i386
Machine Type: i386-apple-darwin9.3.0

Bash Version: 3.2
Patch Level: 39
Release Status: release

        The Mac OS X Filesystem HFS+ reports filenames in Unicode NFD
        Normalization form. As arguments (e.g. open()) all normalization
        forms are accepted.
        Input for the bash from the Terminal.app is usually in NFC.
        This results in problems.
        The German Direcory name "Bücher" (Buecher/Books):
        1. Bash completion does not work
           Bü<TAB> -> Nothing
           Bu<TAB> -> Works
           (glob and Bu* work in the same way)
        2. if \w is included in $PS1 the display length is calculated wrong so
when using the arrow-keys to recall the history the display is disrupted
        3. when an argument is Completeted (Bu<TAB> -> Bücher) the argument
           is in NFD. Deleting the argument results in wrong cursor position

Use the Standard Terminal.app

address@hidden:/tmp $ echo Bücher | hd
00000000 42 c3 bc 63 68 65 72 0a |Bücher.| <-NFC
address@hidden:/tmp $ mkdir Bücher | hd
address@hidden:/tmp $ ls -d B* | hd
00000000 42 75 cc 88 63 68 65 72 0a | Bu?.cher.| <-NFD
address@hidden:/tmp $ cd Bü*
bash: cd: Bü*: No such file or directory
address@hidden:/tmp $ cd Bu*
address@hidden:/tmp/Bücher $

using the history:
address@hidden:/tmp/Bücher $
address@hidden:/tmp/Büchrenampstree -s Ter
address@hidden:/tmp/Bücher $ cd ..

using backspace to delete the completed Filename:
cd Bu<TAB> <Backspace>....
-> the Cursor is one char left of its intended position

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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