Save all paths/filenames always as UTF-8 in wincmd.ini
Moderators: Hacker, petermad, Stefan2, white
Save all paths/filenames always as UTF-8 in wincmd.ini
Consider the following scenario (tested with WinXP):
1) we have a dir with polish letters in name - we can see this name in TCMD and Explorer as "Zdjęcia"
2) we have two subfolders inside: "test1" and "test2"
3) go to Control Panel -> Regional and Language Options -> Advanced tab -> Language for non-Unicode programs
4) select Polish - this will install additional language files from WinXP CD and will reboot computer
5) after reboot open TCMD, go to "Zdjęcia\test1", press Ctrl+D and add it to the hotlist
6) go to Control Panel and now select Arabic (Bahrain)
7) after reboot open TCMD, go to "Zdjęcia\test2", press Ctrl+D and add it to the hotlist
Now we can see in the wincmd.ini:
menu1=test1
cmd1=cd c:\Zdjęcia\test1
menu2=test2
cmd2=cd c:\Zdjęcia\test2
As we can see, the first menu is saved as ANSI, and the second as UTF-8 (I don't know the cause of this difference). This results in:
1) test1 menu works only when Polish language is set - it doesn't work when Arabic is set (TCMD can't go to "c:\Zdjęcia\test1" dir)
2) test2 works properly for Polish and also for Arabic.
Conclusion: it's better to get (from the operating system) all paths/filenames as Unicode and save them as UTF-8 - it works always, regardless of the regional settings. Paths saved as UTF-8 work even in Win9x systems.
Regards!
ADDED:
Same behavior is on the NTFS filesystem and the FAT16 filesystem. So a filesystem is not the cause of the difference in the encoding - the cause is the selected language.
1) we have a dir with polish letters in name - we can see this name in TCMD and Explorer as "Zdjęcia"
2) we have two subfolders inside: "test1" and "test2"
3) go to Control Panel -> Regional and Language Options -> Advanced tab -> Language for non-Unicode programs
4) select Polish - this will install additional language files from WinXP CD and will reboot computer
5) after reboot open TCMD, go to "Zdjęcia\test1", press Ctrl+D and add it to the hotlist
6) go to Control Panel and now select Arabic (Bahrain)
7) after reboot open TCMD, go to "Zdjęcia\test2", press Ctrl+D and add it to the hotlist
Now we can see in the wincmd.ini:
menu1=test1
cmd1=cd c:\Zdjęcia\test1
menu2=test2
cmd2=cd c:\Zdjęcia\test2
As we can see, the first menu is saved as ANSI, and the second as UTF-8 (I don't know the cause of this difference). This results in:
1) test1 menu works only when Polish language is set - it doesn't work when Arabic is set (TCMD can't go to "c:\Zdjęcia\test1" dir)
2) test2 works properly for Polish and also for Arabic.
Conclusion: it's better to get (from the operating system) all paths/filenames as Unicode and save them as UTF-8 - it works always, regardless of the regional settings. Paths saved as UTF-8 work even in Win9x systems.
Regards!
ADDED:
Same behavior is on the NTFS filesystem and the FAT16 filesystem. So a filesystem is not the cause of the difference in the encoding - the cause is the selected language.
Last edited by MarcinW on 2012-04-15, 14:01 UTC, edited 1 time in total.
2MarcinW
Check your FS on C: and D:.
Looks like there's diffrent FS's (C is ntfs, D is fat32) and first of them works with unicode-paths better then second.
Some words about UTF8 "working" in win9x:
how do you imagine working of >128-th characters' of ANSI?
E.g., cyrillic letters (cp1251) or spec.symblos (cp.1252) on same bytes. UTF8 will NEVER work properly with upper then 128-th ANSI symbols! That's why "idea with utf8 in config" is bad decision for Win9x.
Check your FS on C: and D:.
Looks like there's diffrent FS's (C is ntfs, D is fat32) and first of them works with unicode-paths better then second.
Some words about UTF8 "working" in win9x:
how do you imagine working of >128-th characters' of ANSI?
E.g., cyrillic letters (cp1251) or spec.symblos (cp.1252) on same bytes. UTF8 will NEVER work properly with upper then 128-th ANSI symbols! That's why "idea with utf8 in config" is bad decision for Win9x.
Ukrainian Total Commander Translator. Feedback and discuss.
I haven't written anything about drive D:.MaxX wrote:Check your FS on C: and D:.
Looks like there's diffrent FS's (C is ntfs, D is fat32) and first of them works with unicode-paths better then second.
Both directories (test1 and test2) have been created on the same NTFS partition. However, I've tested also on a FAT16 partition with same results. As far as I remember, long filenames on FAT16 and FAT32 are always saved as Unicode.
I just wanted to say that I transferred the wincmd.ini file to the Win98 machine (with Polish language set) and tested. Both Ctrl+D menus: cmd1 and cmd2 work properly - TCMD can reach these directories when using Ctrl+D menu. So UTF-8 encoding in the wincmd.ini is not a problem on a Win98 machine.MaxX wrote:Some words about UTF8 "working" in win9x:
how do you imagine working of >128-th characters' of ANSI?
E.g., cyrillic letters (cp1251) or spec.symblos (cp.1252) on same bytes. UTF8 will NEVER work properly with upper then 128-th ANSI symbols! That's why "idea with utf8 in config" is bad decision for Win9x.
How did you get there symbols I marked?Now we can see in the wincmd.ini:
menu1=test1
cmd1=cd c:\Zdjęcia\test1
menu2=test2
cmd2=cd c:\Zdjęcia\test2
Sorry, missed that one. Looks like I'm getting tired.I haven't written anything about drive D:.

Strange, I've never seen that win9x can work with any type of unicode, including utf-8.So UTF-8 encoding in the wincmd.ini is not a problem on a Win98 machine.
Ukrainian Total Commander Translator. Feedback and discuss.
These symbols are saved in the wincmd.ini file - exactly as I pasted. This is so-called BOM (Byte Order Mark) - it is 0xef 0xbb 0xbf for UTF-8 (see http://en.wikipedia.org/wiki/Byte_order_mark).MaxX wrote:How did you get there symbols I marked?cmd2=cd c:\Zdjęcia\test2
Win9x has a very basic support for Unicode. You may install additional Unicode support - see "The Microsoft Layer for Unicode on Windows 95/98/ME Systems" (see http://msdn.microsoft.com/en-us/goglobal/bb688166).Strange, I've never seen that win9x can work with any type of unicode, including utf-8.