-
Notifications
You must be signed in to change notification settings - Fork 909
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
Don't output NULL between characters #3036
Comments
microsoft/WSL#4607 (comment) fixed the null byte issue. But would love the valid markdown syntax adding [console]::OutputEncoding = New-Object System.Text.UnicodeEncoding This may help too https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8 |
What are you using to see the NULL bytes in the first two screenshots? |
Vscode. I have it set to show the hidden characters. |
If you mean the |
I was in windows PowerShell. Encoding was 1252. Reading the stack overflow I linked earlier you will understand it. So easy fix to force my encoding by either switching to out-file with encoding specified or setting the console output or coding. However, my bonus feature parts of valid markdown export and potential import would be great. |
The issue I want to concentrate on is the first one - the NULL output. I need to understand if this is a Chocolatey issue, we need to be able to reproduce it. So far I've not been able to do that (I have If this is a bug in Chocolatey, can you raise a new issue and complete the Bug report?
This is not something we would look to implement. |
It is potentially if it is sending output in 1252 encoding and it looks like utf16LE might be playing a part. Read the stackoverflow I linked to understand why it isn't defaulted to utf8 in windows powershell. When I open windows PowerShell I get [console]::OutputEncoding
If you just run |
I don't see the issue. Can you raise a bug report, so we can capture all the information? |
Sure but run the command I provided in windows powershell Note : from stackoverflow
https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8 READ full stack overlow! |
I spun up a Windows 10 VM and used Windows PowerShell to run the command last time. I didn't see the NULL bytes.
I did read the Stack Overflow post (thanks for linking to it) and it sounded to me like a PowerShell session / environment issue. But, when I asked:
you responded with:
So, I wanted to reproduce the issue to see if it was a Chocolatey problem.
If this is the root cause, I'll go ahead and close this just now. We can always re-open it again if needed. |
Checklist
Is Your Feature Request Related To A Problem? Please describe.
Output isn't markdown friendly. Running

choco feature >> c:\someMDFile.md
results inDescribe The Solution. Why is it needed?
Don't output nulls between chars.
Additional Context
Bonus points if you have a flag to alter output to make it valid checkbox markdown like so
SUPER BONUS points!!!! 🚀
Allow us to generate a markdown file from current config and then let us alter the markdown file with the changed features and then import that file back in to adjust features.
vs code extension for markdown preview is
https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced
Related Issues
No response
The text was updated successfully, but these errors were encountered: