Filename sort order: Is there a char to put files after Z ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

User avatar
petermad
Power Member
Power Member
Posts: 16094
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I guess it's the first variant with only one leading zero, right ?
I think the zero prefix only applies to values over 128.
So is it right that both charsets now have 256 chars?
Yes, the DOS ascii charset comes in different national variants called codepages, where the upper 128 chars varies. Examples: codepage 437 is the original US IBM charset with line drawing chars, codepage 865 is Danish/Norwegian with 3 altered chars, and codepage 850 is the international codepage where most of the line-drawing characters are replaced with accented characters and greek characters. If you goes to DOS from Windows you will usually be put in codepage 850.

Ansi also comes in different codepages/charsets like Windows Western (1252), Windows Central European (1250) etc.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
chrizoo
Senior Member
Senior Member
Posts: 351
Joined: 2008-03-12, 02:42 UTC

Post by *chrizoo »

chrizoo wrote:
HolgerK wrote:
chrizoo wrote:...I would at least need one char (a single one would really be enough!), which comes after Z.
ž <ALT+ 0158>
HTH,Holger
Wow, that works, thanks a lot!
Uuuuups ... sorry, I was wrong. It doesn't work. It is treated as a normal "z". It did go to the end of the list though when I tested it, because my last file began with "x" .... sorry for the confusion,
but no, unfortunately it does not work.

I have sortUpper=0

and I tried all the codes from ALT+0 to ALT+255
plus everything from ALT+0100 to ALT+0255

and there was no single character that would come after z.

Does anybody have any ideas what to do ?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2chrizoo
ž <Alt+0158> works here with all sorting methods (Options -> Display) and values for SortUpper,
except these two (which should both be avoided then):
  • - Sorting method "Alphabetical, considering accents"
    - SortUpper=0,

Code: Select all

ztest
ztest1
žtest
žtest1
(TC 7.02a, W2k SP4)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
HolgerK
Power Member
Power Member
Posts: 5411
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

petermad wrote:2Clo
Here (with "3"), these characters are placed near the closest ones
We are both right, in a way. I checked it further - the natural sorting (sortUpper=3) is dependant on the language setting of the computer...
Here I get the same sorting order with WinXP SP2 (eng) and Vista Utimate SP1 (German but switched to English UI), both with local settings set to German (Control Panel->Regional and language Options)

Code: Select all

SortUpper:
 0  | 1  | 2  | 3  |
 ____________________
 !  | !  | !  | !  |
 _! | +  | +  | _! |
 +  | 02 | 1  | +  |
 02 | 03 | 02 | 1  |
 03 | 1  | 2  | 02 |
 1  | 10 | 03 | 2  |
 10 | 11 | 10 | 03 |
 11 | 2  | 11 | 10 |
 2  | a  | _! | 11 |
 a  | b  | a  | a  |
 à  | c  | b  | à  |
 ä  | e  | c  | ä  |
 b  | x  | e  | b  |
 c  | y  | x  | c  |
 e  | z  | y  | e  |
 é  | _! | z  | é  |
 è  | ž  | ž  | è  |
 ê  | à  | à  | ê  |
 x  | ä  | ä  | x  |
 y  | è  | è  | y  |
 z  | é  | é  | z  |
 ž  | ê  | ê  | ž  |
Regards,
Holger

Edit:
For all who want to find out, how SortUpper and the actual local settings effect sorting by name:
- Create a new folder
- Place the following CreateFiles.vbs into the new folder.
- Run the script.
- Sort the files by name.
- Change SortUpper using "Config.->Display->Sort method: [ 1 of 4 [v]]" [Apply] .. next sort method..

Code: Select all

Set fso = CreateObject("Scripting.FileSystemObject")
For i = 32 To 255
	If instr ( "<>:\/|?*"" ", chr(i) ) = 0  then
		filename = chr(i) & "." & FormatNumber(i,0)
		Set fl = fso.CreateTextFile( chr(i) & "." & FormatNumber(i,0), True )
		fl.Close()
	End If
Next
User avatar
petermad
Power Member
Power Member
Posts: 16094
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2HolgerK

Well here are the sortings of some characters under Danish locale:

Code: Select all

0  |  1  |  2  |  3
---|-----|-----|-----
#  |  #  |  #  |  #
$  |  $  |  $  |  $
%  |  %  |  %  |  %
&  |  &  |  &  |  &
[  |  +  |  +  |  [
]  |  1  |  1  |  ]
^  | 10  |  2  |  ^
_  |  2  | 10  |  _
{  |  a  |  [  |  {
}  |  b  |  ]  |  }
~  |  d  |  ^  |  ~
+  |  o  |  _  |  +
×  |  s  |  a  |  ×
÷  |  t  |  b  |  ÷
£  |  x  |  d  |  £
¤  |  y  |  o  |  ¤
¥  |  z  |  s  |  ¥
§  |  [  |  t  |  §
µ  |  ]  |  x  |  µ
€  |  ^  |  y  |  €
½  |  _  |  z  |  ½
1  |  {  |  {  |  1
10 |  }  |  }  |  2
2  |  ~  |  ~  | 10
²  |  €  |  €  |  ²
a  |  ž  |  ž  |  a
á  |  ÿ  |  £  |  á
à  |  £  |  ¤  |  à
â  |  ¤  |  ¥  |  â
ã  |  ¥  |  §  |  ã
b  |  §  |  ²  |  b
d  |  ²  |  µ  |  d
o  |  µ  |  ½  |  o
õ  |  ½  |  ×  |  õ
s  |  à  |  ß  |  s
ß  |  á  |  à  |  ß
t  |  â  |  á  |  t
þ  |  ã  |  â  |  þ
x  |  ä  |  ã  |  x
y  |  å  |  ä  |  y
ÿ  |  æ  |  å  |  ÿ
z  |  õ  |  æ  |  z
ž  |  ö  |  õ  |  ž
æ  |  ×  |  ö  |  æ
ä  |  ø  |  ÷  |  ä
ø  |  þ  |  ø  |  ø
ö  |  ß  |  þ  |  ö
å  |  ÷  |  ÿ  |  å
--------------------
As you can see ž is never last!
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5411
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

petermad wrote:2HolgerK

Well here are the sortings of some characters under Danish locale:
...
As expected :wink:
As you can see ž is never last!

But ž comes after z !

Maybe the only solution is to change the user locale to English (or German) and customize the Number, Currency, Time-Format and Keyboard to the real wanted locale.

http://www.microsoft.com/globaldev/reference/localetable.mspx#EMBAC
user local wrote:Determines which settings are used for formatting dates, times, currency, and large numbers as a default for each user. Also determines the sort order for sorting text.
Kind regards,
Holger
Post Reply