Using unicode character u201c

The reason is that in 3.x Python You can’t just mix unicode strings with byte strings. Probably, You’ve read the manuals dealing with Python 2.x where such things are possible as long as bytestring contains convertable chars.

print('\u201c', '\u201d')

works fine for me, so the only reason is that you’re using wrong encoding for source file or terminal.

Also You may explicitly point python to codepage you’re using, by throwing the next line ontop of your source:

 # -*- coding: utf-8 -*-

Added: it seems that You’re working on Windows machine, if so you could change Your console codepage to utf-8 by running

chcp 65001

before You fire up your python interpreter. That changes would be temporary, and if You want permanent, run the next .reg file:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"CodePage"=dword:fde9

Leave a Comment