I used the open function to print out the file handle of a notepad file. The problem is the encoding of the notepad file is 'UTF-8'. But the file handle shows 'cp1252'. Why is there a difference?
Asked
Active
Viewed 23 times
0
-
cp1252 is the windows system default encoding. You can set the encoding when you open the file. Please can you put code in your question – Daniel Lee Oct 27 '20 at 09:30
-
I added the code – Crackerjack Oct 27 '20 at 09:38
-
Well, don't add code as *images*! That's way more inconvenient than just posting it as text (and formaated as "code" of course). – Jongware Oct 27 '20 at 11:39
-
Oh I got my answer. I just have to specify the encoding type. I'm totally new to coding so this might sound dumb – Crackerjack Oct 27 '20 at 15:02