-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support for UTF-8 #42
Comments
Thanks for the report! I found the file in the repo (linking here so i can quickly refer back): https://github.com/pterm/pterm/blob/9d43bad55166341b6349c3c93cc2e764051d9de6/bigtext_printer.go#L135 I'm betting it's an issue with the escaping logic. Let me work up a test case to see if I can find the problem here |
I created some tests but they appear to be producing the output correctly. I tried cloning pterm and running Can you share some more information about how you're configuring/running gomarkdoc? That might help us get to the bottom of this. |
Hi @princjef, thanks for the reply. I just tried it again, with a new clone of PTerm and I still get the wrong characters when I run I don't have any custom configuration. IntelliJ IDEA tells me, that the output file is written in |
@MarvinJWendt ahh okay I think Powershell is the key detail here. I don't have a Windows machine handy to test, but it looks like when piping output, Powershell defaults the encoding to UTF16: https://automationpie.com/changing-powershells-default-output-encoding-to-utf-8/ From what I'm seeing, it doesn't look like there's any way for me to signal the encoding from the
I'd be curious to see if option 2 works for you. If it does, then it may make sense to update the examples to use |
Hi @princjef, sorry for the late reply. Yes the output flag seems to work! And the pipe seems to be the problem. Even as a long time Windows user I never experienced this. Have a nice day and thanks for the research :) |
No worries, thanks for checking it and reporting back! I honestly wasn't aware of the Powershell encoding quirk either, so I'm glad you reported the strangeness. I'll get the docs updated so people don't have the same issue in the future |
Hi, I noticed that some characters are not shown properly:
I guess it's the file encoding.
Repository to reproduce: https://github.com/pterm/pterm
The text was updated successfully, but these errors were encountered: