

Strings are decoded to Unicode and Unicodes are encoded to strings. Strings contain encoded text, beit UTF-8, UTF-16, ISO-8895-1, GBK, Big5 etc.

They only hold Unicode point codes and therefore can hold any Unicode point from across the entire spectrum. In brief, Unicode strings are an entirely separate type of Python string that does not contain any encoding. UnicodeDecodeError: 'ascii' codec can't decode byte generally happens when you try to convert a Python 2.x str that contains non-ASCII to a Unicode string without specifying the encoding of the original string. Without seeing the source it's difficult to know the root cause, so I'll have to speak generally. Unicode Zen in Python 2.x - The Long Version
#STARTUP FAILED 0XD9 HOW TO#
#STARTUP FAILED 0XD9 CODE#
Try to convert strings to Unicode strings as soon as possible in your code.Don't assume your strings are UTF-8 encoded.In my site, Chinese post can be published successfully. In some other python-based static blog apps, Chinese post can be published successfully. Note: Markdown only accepts unicode input! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 1: ordinal not in range(128). ta = (page.original)įile "/usr/local/lib/python2.7/site-packages/wok/renderers.py", line 46, in renderįile "/usr/local/lib/python2.7/site-packages/markdown/init.py", line 419, in markdownįile "/usr/local/lib/python2.7/site-packages/markdown/init.py", line 281, in convert

P = om_file(os.path.join(root, f), self.options, self, renderer)įile "/usr/local/lib/python2.7/site-packages/wok/page.py", line 111, in from_file As3:~/ngokevin-site# nano content/blog/20140114_test-chinese.mkdįile "/usr/local/lib/python2.7/site-packages/wok/engine.py", line 104, in initįile "/usr/local/lib/python2.7/site-packages/wok/engine.py", line 238, in load_pages
