ZTree.com  | ZEN  | About...  

 Index   Back

Workaround: looks okay   [Zeta]

By: Hartmut Schneider     Germany  
Date: Nov 04,2019 at 07:25
In Response to: Possible explanation (Kim Henkel)

Kim:
>> The redirected output prior to [the command] is correctly UTF16-LE encoded,
>> but the output of CHCP is ANSI, and just happens to be an odd number of
>> bytes, meaning the following UTF-16 encoding is now one-byte misaligned,
>> effectively turning it into UTF16-BE.

Me:
> As for my needs: I could try if my script could convert the tool output to Unicode,
> e.g. piping it through a Unicode converter, e.g. 'iconv -f MS-ANSI -t UTF16'

I changed my script so it converts the output of the called tool(s) to UTF16-LE,
e.g. {display_properties} {target_binary} | iconv -f MS-ANSI -t UTF-16LE
and it works!
As far as I see now, I can live with this solution.
It has the advantage to support Unicode-coded text, if there is any.

To have a more common solution, I'm still suggesting the „Possible solution”
see https://www.ztw3.com/forum/forum_entry.php?id=122591 , just above this post.

Sincerely,
Hartmut

60 views      
 

Messages in this Thread

 
94,580 Postings in 11,930 Threads, 348 registered users, 10 users online (1 registered, 9 guests)
Index | Admin contact |   Forum Time: Nov 15, 2019 - 3:27 am EST  |  Hits:29,105,126  (2,340 Today )
RSS Feed