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)

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

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



Messages in this Thread

94,801 Postings in 11,952 Threads, 348 registered users, 8 users online (1 registered, 7 guests)
Index | Admin contact |   Forum Time: Apr 4, 2020 - 9:12 am EDT  |  Hits:30,536,134  (1,990 Today )
RSS Feed