|
@@ -95,7 +95,7 @@ When data is sent over the Internet, we need to send it in bytes... something yo
|
|
|
|
|
|
**How It Works**
|
|
|
|
|
|
-We use io.open and then use the `encoding` argument in the first open statement to encode the message, and then again in the second open statement when decoding the message. Note that we should only use encoding in the open statement when in text mode.
|
|
|
+We use `io.open` and then use the `encoding` argument in the first open statement to encode the message, and then again in the second open statement when decoding the message. Note that we should only use encoding in the open statement when in text mode.
|
|
|
|
|
|
Whenever we write a program that uses Unicode literals (by putting a `u` before the string) like we have used above, we have to make sure that Python itself is told that our program uses UTF-8, and we have to put `# encoding=utf-8` comment at the top of our program.
|
|
|
|