I don't quite understand the description of one parameter. Please do me a favor

CSDN Q & A 2022-05-15 04:41:43 阅读数:650


In the python book (《Python Programming from entry to practice 》 The first 2 edition )10.3.5 There is a sentence in it , That is to say :“ When the default code of the system is inconsistent with the code of the file to be read , This must be done .”(“ To do so ” Is a function encoding Specify a value ) What does this code mean ? So what are the regulations when assigning this parameter ? What value should be assigned ? What is the difference between assignment and non assignment ? I hope you can give me a beginner who has just started and a better answer ,thanks

Take the answer :

Coding is equivalent to language , decode (encoding) Is the way to understand language .
For example , Your computer can only speak Chinese , There is a Japanese who writes all the documents to you in Japanese , Your computer interprets... In Chinese , Seven or eight , For example, the kana and other Chinese characters inside , But the overall meaning is still unreadable ( The statement ). This time you give encoding A value , Tell the computer to read this article in Japanese , The computer can read Japanese .
The actual encoding and decoding process is more complex than this , But the truth is similar .

版权声明:本文为[CSDN Q & A]所创,转载请带上原文链接,感谢。 https://primo.wiki/2022/131/202205041916555067.html