无法解释排序(1)的行为

sti*_*mur 6 linux sorting ls

当我看到ls以奇怪顺序列出的下列文件时,我一直很困惑:

Star Wars Episode II - Attack of the Clones (2002) BDRip.mkv
Star Wars Episode III - Revenge of the Sith (2005) BDRip.mkv
Star Wars Episode I - The Phantom Menace (1999) BDRip.mkv
Star Wars Episode IV - A New Hope (1977) BDRip.mkv
Star Wars Episode VI - Return of the Jedi (1983) BDRip.mkv
Star Wars Episode V - The Empire Strikes Back (1980) BDRip.mkv
Run Code Online (Sandbox Code Playgroud)

从人的角度来看,"我"应该先行,然后"行进",等等.

所以我用以下内容创建了文件:

$ cat 1
Star Wars Episode II - Attack
Star Wars Episode III - Revenge
Star Wars Episode I - The
Star Wars Episode IV - A
Star Wars Episode VI - Return
Star Wars Episode V - The
Run Code Online (Sandbox Code Playgroud)

如果我对它进行排序它会给我这个:

$ sort 1
Star Wars Episode II - Attack
Star Wars Episode III - Revenge
Star Wars Episode I - The
Star Wars Episode IV - A
Star Wars Episode VI - Return
Star Wars Episode V - The
Run Code Online (Sandbox Code Playgroud)

但是,如果我删除' - '并且在排序正确之后的所有内容:

$ cat 1
Star Wars Episode II 
Star Wars Episode III 
Star Wars Episode I 
Star Wars Episode IV 
Star Wars Episode VI 
Star Wars Episode V 

$ sort 1
Star Wars Episode I 
Star Wars Episode II 
Star Wars Episode III 
Star Wars Episode IV 
Star Wars Episode V 
Star Wars Episode VI 
Run Code Online (Sandbox Code Playgroud)

所以,只要我在空格后添加任何符号,它就会开始为我排序不可预测:

$ cat 1
Star Wars Episode II y
Star Wars Episode III x
Star Wars Episode I z
Star Wars Episode IV w
Star Wars Episode VI v
Star Wars Episode V u

$ sort 1
Star Wars Episode III x
Star Wars Episode II y
Star Wars Episode IV w
Star Wars Episode I z
Star Wars Episode VI v
Star Wars Episode V u
Run Code Online (Sandbox Code Playgroud)

有关此排序行为的任何提示吗?

更新: 排序:使用'en_CA.UTF-8'排序规则

根据下面的评论更新#2是因为语言环境.

ls | LANG=C sort
Star Wars Episode I - The Phantom Menace (1999) BDRip.mkv
Star Wars Episode II - Attack of the Clones (2002) BDRip.mkv
Star Wars Episode III - Revenge of the Sith (2005) BDRip.mkv
Star Wars Episode IV - A New Hope (1977) BDRip.mkv
Star Wars Episode V - The Empire Strikes Back (1980) BDRip.mkv
Star Wars Episode VI - Return of the Jedi (1983) BDRip.mkv
Run Code Online (Sandbox Code Playgroud)

为什么然后UTF8语言环境使它与众不同?我检查了ru_RU.UTF8(错误排序)和ru_RU.KOI8-R(正确排序)

更新#3这是关于语言环境:http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021