SlideShare a Scribd company logo
Encoding
b'xe6x96x87xe5xadx97xe7xb7xa8xe7xa2xbc'
先來回想⼀一下...
先來回想⼀一下...
當學⽣生的時候⼀一定想過要怎麼跟隔壁同學作
弊...
Morse Code
A: ・__
B: __・・・
C: __・__・
D: __・・
Morse Code
A: ・__
B: __・・・
C: __・__・
D: __・・
嗶嗶—
嗶—嗶嗶嗶
嗶—嗶嗶—嗶
嗶—嗶嗶
Morse Code
A: ・__
B: __・・・
C: __・__・
D: __・・
左右
右左左左
右左右左
右左左
Encode / Decode
Encode / Decode
Encode / Decode
Encode
左右
Encode / Decode
Encode
左右 左右
Transport
Encode / Decode
Encode
左右 左右
DecodeTransport
Encode / Decode
50 59 43 4F 4EPYCON
Text Bytes (8 bits)Encode
Writing
Reading
Bytes
50 59 43 4F 4E
Decode Text
PYCON
Encode / Decode in the web
Encode / Decode in the web
HTML Documents
Encode
Bytes
Server
Encode / Decode in the web
HTML Documents
Encode
Bytes
Transport
Server Internet
Encode / Decode in the web
HTML Documents
Encode
Bytes
Transport
Server Internet
Decode
Client
Character Encoding
先回到剛剛的例⼦子,⽤用摩斯電碼作弊
Character Encoding
如果我們把Morse Code ABCD 換成 1234 呢
Character Encoding
A: ・— — — —
B: ・・— — —
C: ・・・— —
D: ・・・・—
左右右右右
左左右右右
左左左右右
左左左左右
Character Encoding
我們把第⼀一種叫做Morse ABCD 第⼆二種叫做
Morse 1234
Character Encoding
如果踢椅⼦子的⼈人⽤用Morse ABCD encode
被踢椅⼦子的⼈人⽤用Morse 1234 decode
Character Encoding
Character Encoding
Character Encoding
Encode
左右
Morse ABCD
Character Encoding
Encode
左右 左右
Transport
Morse ABCD
Character Encoding
Encode
左右 左右
DecodeTransport
Morse ABCD Morse 1234
Character Encoding
Character Encoding
HTML Documents
Encode
Bytes
Server
Big5
Character Encoding
HTML Documents
Encode
Bytes
Transport
Server Internet
Big5
Character Encoding
HTML Documents
Encode
Bytes
Transport
Server Internet
Decode
Client
Big5
UTF-8
Character Encoding
UTF-8: ⽬目前最廣泛的編碼系統 實作Unicode的
⽅方法之⼀一 (Unicode 又稱萬國碼)
ASCII: 早期最廣泛的編碼系統 ⽬目前多被
Unicode取代
Big5: ASCII不⽀支援中⽂文 所以早期台灣中⽂文網
站會⽤用Big5
Character Encoding
⽤用哪種⽅方法encode就要⽤用哪種⽅方法decode!
Character Encoding
這樣才能成功作弊!
Character Encoding
在Chrome裡可以⽤用 檢視 > 字元編碼 來重設網
⾴頁的編碼⽅方式
Character Encoding
http://www.angelfire.com/ok/leekawo/
hacker.htm
讓這個網⾴頁變成可看的中⽂文!
Encoding in Python
在Python中練習 encode / decode 技巧
Encoding in Python
Python 的 string 以 Unicode 為標準
bytes 即為 string encode 的結果!

More Related Content

PPT
STM and LTM: Capacity and Encoding
PPT
Slideshare version simple explanations of definitions
DOC
Abnormality
PPT
Charlotte s1 4-definitions of abnormality
PPTX
Attachment PSYA1 - Inc. Bowlby and Ainsworth
PDF
Memory revision booklet
PPTX
Mod 6 harlow
PPTX
01 - Intro to Abnormal Psychology
STM and LTM: Capacity and Encoding
Slideshare version simple explanations of definitions
Abnormality
Charlotte s1 4-definitions of abnormality
Attachment PSYA1 - Inc. Bowlby and Ainsworth
Memory revision booklet
Mod 6 harlow
01 - Intro to Abnormal Psychology

Viewers also liked (14)

PPTX
Aqa research methods 1
PPTX
Phobias
PPTX
Abnormality - PSYA2
PDF
Short and long term memory
PPTX
Cognitive psychology - Memory (PSYA1)
PPTX
Mod 3 working memory model slides
PPTX
Morse code (-- --- .-. ... . -.-. --- -.. .)
PPT
Morse code
PPT
Morse code
PPTX
Abnormal psychology
PPTX
Research methods - PSYA1 psychology AS
PPTX
PSYA4 - Research methods
PPTX
Attachment PSYA1
PPTX
Psychology- Memory
Aqa research methods 1
Phobias
Abnormality - PSYA2
Short and long term memory
Cognitive psychology - Memory (PSYA1)
Mod 3 working memory model slides
Morse code (-- --- .-. ... . -.-. --- -.. .)
Morse code
Morse code
Abnormal psychology
Research methods - PSYA1 psychology AS
PSYA4 - Research methods
Attachment PSYA1
Psychology- Memory
Ad

More from Wey-Han Liaw (13)

PDF
Python 官方文件中文翻譯專案 - 探討翻譯專案的貢獻流程
PDF
Educational Code Reviews
PDF
Learning: Being as a Homeschooled Student
PDF
Jupyter Kernel: How to Speak in Another Language
PDF
Udacity Taipei meetup #2 如何駕馭線上課程
PDF
Python自學從你小時候開始
PDF
Meteor Taipei 2016 January talk -- Mantra
PDF
Understanding Meteor Stack
PDF
Async, await
PDF
SITCON summer camp 2015: Adrian說他那身邊的一堆社群
PDF
NCCU 0617 talk
PDF
Implementation of Rubik's Cube Formula in PyCuber
PDF
PyCon 2015 Crawler Tutorial Explain Cookies
Python 官方文件中文翻譯專案 - 探討翻譯專案的貢獻流程
Educational Code Reviews
Learning: Being as a Homeschooled Student
Jupyter Kernel: How to Speak in Another Language
Udacity Taipei meetup #2 如何駕馭線上課程
Python自學從你小時候開始
Meteor Taipei 2016 January talk -- Mantra
Understanding Meteor Stack
Async, await
SITCON summer camp 2015: Adrian說他那身邊的一堆社群
NCCU 0617 talk
Implementation of Rubik's Cube Formula in PyCuber
PyCon 2015 Crawler Tutorial Explain Cookies
Ad

PyCon 2015 Crawler Tutorial Explain Encoding