ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Junction point with Unicode-named directory   [Help!]

By: John Gruener     Orlando, Florida  
Date: Nov 05,2020 at 23:13
In Response to: [Help!] Junction point with Unicode-named directory (Laurent Duchastel)

Hi Laurent,

I'm no expert with this, but since no one has responded for a few days I thought I'd try to help with what I think I know about it.

The issue is with code pages. There are two code pages in Windows. One is the OEM code page that console programs use, and the other is the ANSI or "Windows" code page used in GUI. For the most part these code pages are single-byte. In addition, Windows supports UTF-16LE (16-bit Little-endian Unicode), which does not involve either of the code pages, and uses this to write all NTFS file and directory names.

Since console programs and batch files use code pages, they are by default limited to accessing only the single-byte character part of the NTFS Unicode names. So the internal CMD conversion just substitutes an unusable character like a question mark for those Unicode characters that use both bytes. (Powershell, on the other hand, supports Unicode.)

The usual workaround of course is to access the short name, but since this is not available for you that's not an option.

One option would be to use the CHCP command to change the OEM code page to UTF-8 using CHCP 65001 at the start of the batch script. This might convert the UTF-16 names into workable names. But even if you managed to get this to work outside of ZTree, I suspect it may not work in the ZTree F9 menu because ZTree itself is running in your default code page, and therefore cannot pass the % parameters in Unicode (even if it were programmed to do so, which it may not be).

Unfortunately this leaves me with no suggested solution, but perhaps my explanation will lead you to some ideas.

Let us know how it goes.

- John

101 views      
 

Messages in this Thread

 
95,140 Postings in 11,997 Threads, 350 registered users, 64 users online (0 registered, 64 guests)
Index | Admin contact |   Forum Time: Nov 27, 2020 - 8:45 am UTC  |  Hits:35,746,067  (6,132 Today )
RSS Feed