I have a question about cp949 error when reading Python files

Asked 2 years ago, Updated 2 years ago, 17 views

I know it's not in the same position, so I move it to the desktop and try to read it again, but I get an error called cp949.

How do I read the file?

And the concept of out is spacing?

python

2022-09-20 16:38

2 Answers

The kids don't know what the basic encoding is, but... This is based on utf-8 encoding used in Visual Studio.

This error is usually resolved by specifying the encoding format when opening a file in the following manner:

open('txt.txt', 'r', encoding = 'utf-8') as txt:


2022-09-20 16:38


2022-09-20 16:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.