question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AREPL Encoder cp1252 to utf-8

See original GitHub issue

Issue Description

I’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

Encoder

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 ”,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mthekidcommented, May 23, 2020

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…

0reactions
Almenoncommented, May 24, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found