大写/小写的文件名被认为是相同的

发布于 2025-01-25 05:00:59 字数 182 浏览 2 评论 0原文

Windows(Windows 10)中的文件和文件夹名称记录在UTF-16 LE中。而且异常,

A和A
B和B
C和C
... Z和Z

被认为是相同的字符。例如,我们无法在同一文件夹中生成abc.txt和abc.txt(没有特殊方法)。

我的问题是,这26对是唯一的例外吗?

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 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待圉鍢 2025-02-01 05:00:59

不,这不仅仅是ASCII。 NTFS量存储在一个名为 $ upcase 。这意味着,在同一台机器上的不同体积上,实际映射可能会有所不同(如果上述卷上有不同的NTFS版本)。

Windows本身以多种方式处理案例灵敏度。

  • 当应用程序打开文件时,他们可以通过POSIX标志来请求不同的语义。
  • NT API允许呼叫者在将其传递给对象管理器的名称上指定案例处理。
  • Windows 10允许您关闭使用fsutil文件setCaseSisesiveInfo ...的文件夹上的病例敏感性。

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 ....
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文