susandes-male
@susandes-male

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Windowsのエクスプローラにおけるファイルの表示順について

エクスプローラにおけるファイルの表示順のデフォルトは名前順(文字コード)だと思っていたのですが、それが違うようなので質問します。
アスキー文字(00H~7FH)において英数字および制御文字を除く記号文字は33種類(空白を含む)あります。
Windowsでは次の9種類の記号文字が、ファイル名称には使用できません。
 使用不可の文字:「"」、「*」、「/」、「:」、「<」、「>」、「?」、「\」、「|」
よってファイル名称で使用できる記号文字は24種類です。

そこで次のような実験を行いました。
(1)同一フォルダ内に「X〇Y.txt」というテキストファイルを作成する。
  ただし〇は上記のファイル名称で使用できる記号文字(24種類)とする。
(2)エクスプローラのデフォルトの状態(名前の昇順)でファイル名の表示順を確認する。

表示結果は次の通りでした。
(1)次の4種類の記号文字以外はアスキーコード順に表示されました。
コード順でない記号文字:「'」、「+」、「-」、「=」
(2)コード順でない記号文字は、アスキーコードの最後の記号文字「~」(7EH)の後ろになります。
  その表示順は次の通りです。
   「+」(2BH)<「=」(3DH)<「'」(27H)<「-」(2DH)

なぜこの4種類の記号文字だけ、このような順序になるのでしょうか。

0

1Answer

具体的にはここらへんの話でしょうか?

The answers provided in this discussion, while interesting, are somewhat esoteric. The simple answer is that none of the symbols are sorted after the letters (not taking into account the special way ' and - is handled, see below).

The other answers state that symbol characters are sorted by Unicode value. However, for Windows 10 File Explorer characters in the Basic Latin block (ASCII characters), this is not strictly true.

The following table of ASCII characters allowed in filenames (showing the characters, their Unicode values and a description of the character) is arranged in the sort order used by Windows 10 File Explorer.

ASCII Characters Allowed in Filenames

           Unicode
Character  Hex Value     Description
---------  ------------  ----------------------------------------
!          0021          exclamation mark
#          0023          number sign
$          0024          dollar sign
%          0025          percent sign
&          0026          ampersand
(          0028          left parenthesis
)          0029          right parenthesis
,          002C          comma
.          002E          full stop/period
;          003B          semicolon
@          0040          commercial at sign
[          005B          left square bracket
]          005D          right square bracket
^          005E          circumflex accent
_          005F          low line, underscore
`          0060          grave accent
{          007B          left curly bracket
}          007D          right curly bracket
~          007E          tilde
+          002B          plus sign
=          003D          equal sign
0-9        0030 – 0039   digit zero through digit nine
A-z¹       0041 – 005A,  capital letter A through Z
           0061 – 007A   small letter a through z
𝘪𝘨𝘯𝘰𝘳𝘦𝘥²
'          0027          apostrophe
-          002D          hyphen/minus

¹ File Explorer's sort order does not differentiate between uppercase and lowercase letters in filenames
² File Explorer ignores ' and - when sorting unless there's a direct conflict with another filename, in which case, the opposed filename takes precedence (e.g. foo is sorted before -foo); the only exception is when they're the only character in a filename – they'll then be after ,

0Like

Your answer might help someone💌