PY4E - Unicode and UTF-8 in Python (Chapter 12 Part 4)

preview_player
Показать описание

Please visit the web site to access a free textbook, free supporting materials, as well as interactive exercises.

Related videos from Henry C.
Рекомендации по теме
Комментарии
Автор

I was working on a web scraping project last month and this is where I got stuck.
Something about the coding/encoding wasn't working... but I had no clue then what the problem was or what it meant.

This course is brilliant - really motivating me to keep going as I can see the progress in my knowledge!

tlhogid
Автор

ascii - maps characters to integers e.g. lower case a -> 97 (easy)
unicode - python's mapping standard e.g. utf-8 (hard)
string (unicode) -> encode (utf-8) -> send -> socket -> recv -> decode (unicode)

brothermalcolm
Автор

miss unicode/utf-32 were used..instead of ascii being used with 8bits or 1 byte per character..it would be 4 bytes or 32 bits and 4 times larger...

angelicamatch
Автор

I am a fan of yours. Good work.
Arduino sends data to Python as <type(Unicode)> .
In Python;
the data is integers and I need it as integers. I am quite sure that unicode includes whitespace.

I have seen this work: data_from_arduino = int(data_from_arduino) but now it does not.

Treating the Unicode like a string does not seem to work. (like breaking it apart)

lstrip(data_from_arduino) does not work. Any ideas.

mrphysh
Автор

hello sir, , how did you type that chineese like symbol at 5 39 time???

angelicamatch
Автор

Isn't ascii 7 bits 127 characters? ??

angelicamatch
Автор

im still confused about thois ..watching iot many times..i understamd but still dont process it i guess..also hope you can assuit me with the ....unicode decode error ..cant decode byte..character maps to undefined..thz ..angelica

angelicamatch
Автор

mmmm thanks this video really help me so i will download your book

tomasgomez
Автор

Hello I was hoping you can help me. ...I keep getting Unicode decode errors. ..can't decode bytes 7414 at cp 1252 ...python 2 runs ok but not python 3

angelicamatch
Автор

hello sir i didnt wan to run your code cuz it had a while true and that is always a n infenite loop and i ran it anyay and i can open mu IDLE cuz it says cant connect ..how do i get out or stop this plz?/..i tried cntrl C but it doesnt work

angelicamatch
Автор

hello sir ..im getting 400 bad request..i tried http and https

angelicamatch
Автор

Thank you for this excellent explanation!

jrrobita