Skip to content
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

Python Native REPL cannot handle some unicode #24481

Closed
YongHee-Kim opened this issue Nov 24, 2024 · 1 comment
Closed

Python Native REPL cannot handle some unicode #24481

YongHee-Kim opened this issue Nov 24, 2024 · 1 comment
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@YongHee-Kim
Copy link

Behaviour

Native REPL cannot handle some unicode string properly

Steps to reproduce:

When you include korean letters in a string variables, most of letters throws UnicodeEncodeError: 'utf-8' codec can't encode error from the Python Native REPL. However, they works on the terminal

# Throws UnicodeEncodeError
a = "소문자"
b = "こんにちは"

# Doesn't throw error 
c = "안녕하세요"

Image
Image

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Traceback (most recent call last):
  File "c:\Users\ykim\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\python_server.py", line 129, in exec_user_input
    callable_ = exec_function(user_input)
  File "c:\Users\ykim\.vscode\extensions\ms-python.python-2024.20.0-win32-x64\python_files\python_server.py", line 94, in exec_function
    compile(user_input, "<stdin>", "eval")
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'utf-8' codec can't encode character '\udc90' in position 13: surrogates not allowed

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 24, 2024
@karthiknadig
Copy link
Member

Duplicate #24479

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants