AREPL Encoder cp1252 to utf-8
See original GitHub issueI’m new to AREPL so if I’m just overlooking a simple feature that already exists or it’s user error feel free to call me out.
When I run the code:
import sys print(sys.stdout.encoding)
AREPL prints: cp1252 VSCode in the terminal prints: utf-8 Also VSCode encoder is set to UTF-8
This difference can be quite inconvenient when trying to pull data from a web page and AREPL returns “UnicodeEncodeError: ‘charmap’ codec can’t encode characters in position 0-4: character maps to <undefined>”,
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Convert from windows-1252 to utf-8 in python - Stack Overflow
Writing a string to a file already implicitly converts it, and you can actually do the same for reading, too, by specifying an...
Read more >cp1252 vs utf8 - ViviMinervino
Martin is right: eventhough Windows-1252 is supported by most system, UTF-8 is far more portable and is in fact the de-facto standard for...
Read more >How to reliably guess the encoding between MacRoman ...
PYTHON : How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII [ Gift : Animated Search Engine ...
Read more >My text file is riddled with question marks. How can I make it ...
I clicked UTF-8 > Reopen with Encoding, and VS Code displayed "Western (Windows 1252) Guessed from content" as its top suggestion.
Read more >Encoding utf-8 to Windows-1252 - String Functions
Dec Hex utf‑8 Windows‑1252
64 40 @ @
65 41 A A
66 42 B B
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hmm i don’t think so it is really helpful answer…
I am Korean and i used korean characters in comment in python file in vs Code.
but arepl didn’t works when korean character in code.
I found some trouble issues in Encoding tech in Korean.
There is some trouble when using EUC-KR encoding tech. And my OS using cp949…
So I changed my encoding setting in windows system.
control -> World&National -> Administration Option -> change the system Local -> Check box : Beta :~~~~~~ Unicode UTF-8 using.
After rebooting my computer.
there is no problem using arepl in vs code…
My English writing skills are not good…
but I hope it will help some people…
I just released AREPL 1.0.24! AREPL should now work with unicode on Windows. No .env required. Not sure about linux/mac. Sorry about the delay, I had a absolutely horrendous time dealing with a stdout issue.
@mthekid @GitToh @NigelBloom can you test it and confirm if it works now please?