This shows you the differences between two versions of the page.

Link to this comparison view

pythonunicode [2019/08/21 17:00] (current)
yassine chaouche created
Line 1: Line 1:
 +[[index|Home]] > [[Computers | Computers]] > [[programming|programming]] > [[python]] > [[pythonunicode]] | [[About]]
 +The rule is simple : 
 +If you are *reading* unicode and want to print it to the console (or to another program), you should *always* transform the unicode into a string
 +mystring = function_that_returns_unicode()
 +print mystring.encode("​utf-8"​)
 +No more problems ! 
 +contact : [[http://​twitter.com/​ychaouche|@ychaouche]] yacinechaouche at yahoocom

QR Code
QR Code pythonunicode (generated for current page)