"HEAD" mangles stream encoding

Aug 23, 2010
486
6
From the nearby thread, the example
Code:
wmiquery . "select Name,ProcessId,DisplayName from Win32_service where Started='TRUE'"
produces output like
Code:
DisplayName = Информация о совместимости приложений
Name = AeLookupSvc
ProcessId = 540
But when I'm trying to pipe it through TCC's internal "HEAD", the character encoding is utterly destroyed…

Code:
DisplayName = ?-aRa┐ ??i R aR?┐?aa?┐Raa? ?a?<R│?-?c
Name = AeLookupSvc
ProcessId = 540
 
Aug 23, 2010
486
6
TCC will send the text as ASCII
the output of WMIQUERY is in CP866.

In INI file,
UnicodeOutput=No

Setting it to "Yes" breaks expectation in many other places. (Not to mention, it uses UTF-16 rather than UTF-8, which breaks compatibility on a very high level.)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,957
53
Albuquerque, NM
prospero.unm.edu
Why it has to use any codepage to begin with?
If your output is in Unicode, then code pages are irrelevant.

But if it is not Unicode, then it must be some other encoding. And the current code page identifies what that "other encoding" is. TCC should be using the code page to determine whether, say, character #136 is И or ט or Ι or or ê or or ....