ZTree.com  | ZEN  | About...  

 Index   Back

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

By: Laurent Duchastel     Montréal, Québec  
Date: Nov 06,2020 at 14:30
In Response to: [Help!] Junction point with Unicode-named directory (John Gruener)

> 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.
>


Thank you John.

I suspected Code Page, but didn't play with them since DOS...
I thought Unicode was supported in all console sessions since.

It would be okay, as there are not many junctions to make, to perform manually a mklink command at prompt.

I'll try tomorrow and let you know, of course!

Thanks again for taking the time to answer.


Laurent Duchastel

73 views      
 

Messages in this Thread

 
95,140 Postings in 11,997 Threads, 350 registered users, 70 users online (0 registered, 70 guests)
Index | Admin contact |   Forum Time: Nov 27, 2020 - 9:14 am UTC  |  Hits:35,746,339  (6,404 Today )
RSS Feed