Closed GoogleCodeExporter closed 9 years ago
According to [1], you're listed as primary maintainer of pstree, so how do you
want to handle this?
[1] http://code.google.com/p/volatility/wiki/Plugins
Original comment by mike.auty@gmail.com
on 6 Apr 2012 at 5:12
I committed a back port of the fix for the circular reference issue but the
unicode issue goes beyond pstree alone. Is unicode supported in trunk? If not
we can close this bug, or else we can merge it with some other unicode related
bug?
Original comment by scude...@gmail.com
on 6 Apr 2012 at 5:39
Unicode is supported in trunk for String objects by providing an encoding
parameter, and so by extension _UNICODE_STRINGs. The output format is ascii
with encoding errors replaced by ?, so str(task_info['command_line']) should be
used to ensure that the string can be printed to the console without issue.
Original comment by mike.auty@gmail.com
on 6 Apr 2012 at 5:51
Ok so unicode is supported by replacing non ascii characters with "?"?
Thats not what I would call supported. If you check the scudette
branch the outfd which render_text() is writing on is not just a bare
stdout but its wrapped with a special class which ensure output is
encoded appropriately. You can also just use
codecs.StreamWriter(sys.stdout) instead to do the same thing.
So I think your unicode support in trunk is very close, you just need to:
1) pass a wrapper stream to the render_text method in
commands.Comamnd.execute(). You can have a global flag which controls
encoding or do some clever guessing - on linux always use utf8, on
windows you need to find the current code page.
2) Always expand formatting into unicode when writing. e.g (note the
unicode format string):
outfd.write(u"{0} cmd: {1}\n".format(' ' * pad,
process_params.CommandLine))
This is better than forcing the UNICODE_STRINGS to a string which will
destroy any unicode information.
Michael.
Original comment by scude...@gmail.com
on 6 Apr 2012 at 6:11
This issue was closed by revision r1870.
Original comment by michael.hale@gmail.com
on 13 Jun 2012 at 3:52
Original issue reported on code.google.com by
scude...@gmail.com
on 4 Apr 2012 at 2:48