File and folder names in Windows (Windows 10) are recorded in UTF-16 LE. And exceptionally,
A and a
B and b
C and c
...
Z and z
are regarded as the same character. For example, we cannot generate abc.txt and aBc.txt in a same folder(without special method).
My question is, are these 26 pairs the only exceptions ?
CodePudding user response:
No, it is not just ASCII. NTFS volumes store the mapping in a hidden special file named $UpCase
. This means that the actual mapping can be different on different volumes on the same machine (if there are different NTFS versions on said volumes).
Windows itself handles case sensitivity in multiple ways.
- When applications opens a file they can pass a POSIX flag to request different semantics.
- The NT API allows the caller to specify case handling on names it passes to the object manager.
- Windows 10 allows you to turn off case-sensitivity on a folder with
fsutil file setCaseSensitiveInfo ...
.