New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 instead of UTF16 for international support #1220
Comments
We've used UTF8 initially for international domain support, but it turned out that at least in a classic Perhaps it's possible to make Powershell aware of the UTF16 output encoding somehow? https://stackoverflow.com/questions/49476326/displaying-unicode-in-powershell |
Thanks for the link, that looks promising. I had not tried setting Another option worth considering is perhaps adding an |
A setting is always an option if it turns out that it's not possible to get Powershell to understand the output stream. Another thing that you might try in your case is to look at the log file instead of capturing the screen output. |
I was able to try changing the input and output encoding, and that kind of fixed it. It now looks like wacs.exe outputs errors in a different encoding. Here's an example of what I get when I run it normally:
And here's an example of what I get when I change the output encoding to
So it looks like I fixed one thing, but broke another thing. |
There will be a setting for this in the next release :) |
Released in 2.1.0 |
Issue description
I appreciate that WACS is friendly for international users and supports Unicode instead of just ASCII. However the choice of UTF16 (AKA
Encoding.Unicode
) really creates some weird problems. As a trivial example, if I run this command in PowerShell:... it produces a text file that looks like this:
PowerShell inserts extra null characters because it assumes each two-byte character is actually two separate one-byte characters.
Parsing output looking for
[WARN]
and[EROR]
also becomes more difficult because of this. In PowerShell, I'd normally expect to be able to do this:But PowerShell doesn't do this correctly. I actually have to do this instead:
Would it be possible to use the UTF8 encoding instead? This would give us the best of both worlds: It's still a Unicode encoding with the ability to display international character sets, yet it remains backward-compatible with shells that assume an ASCII encoding.
The text was updated successfully, but these errors were encountered: