News

Normally, in Python 2, I can do so using strings, because a string can contain any bytes, in any order. However, Unicode is quite strict about which bytes represent characters, in no small part ...
In Python, this is done using the encode () method. For example, u"Hello World!".encode ('utf-8') converts the Unicode string to a byte string using UTF-8 encoding.