|
|
Subscribe / Log in / New account

Filesystems and case-insensitivity

Filesystems and case-insensitivity

Posted Nov 29, 2018 12:16 UTC (Thu) by skissane (subscriber, #38675)
Parent article: Filesystems and case-insensitivity

> POSIX does not have a way for filesystems to communicate the encoding of their file names; if that existed, glibc could handle the differences.

Maybe it should? Or, maybe, at least, Linux kernel should add some API to report the filesystem path name encoding. If Linux does it, maybe it could be added to POSIX by Austin Group.

Or, something I'd like even better – it must always be UTF-8, and filesystem has to translate to/from if anything else. But, that's probably going to cause backwards compatibility issues for some people, whereas just reporting filesystem encoding to user space won't.


to post comments

Filesystems and case-insensitivity

Posted Dec 6, 2018 12:34 UTC (Thu) by rleigh (guest, #14622) [Link]

Example for ZFS:

    % zfs get all rpool/ROOT/default
    NAME                PROPERTY              VALUE                  SOURCE
    rpool/ROOT/default  type                  filesystem             -
    rpool/ROOT/default  creation              Sun Jun 12 10:46 2016  -
    …
    rpool/ROOT/default  utf8only              on                     -
    rpool/ROOT/default  normalization         formD                  -
    rpool/ROOT/default  casesensitivity       sensitive              -
    …

Case sensitivity is selectable. You can force it to only store valid UTF-8, and you can choose whether the UTF-8 is normalised or not. Or you can allow it to store anything. This gives you full backward compatibility with historical UNIX behaviour should you want it, or you can restrict it case sensitive normalised UTF-8. Having this selectable on a per-filesystem basis gives you a great deal of flexibility, and it defaults to something sensible (the above are the defaults).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds