Python 3 print() function with Farsi/Arabic characters

I simplified my code for better understanding. here is the problem : case 1: # -*- coding: utf-8 -*- text = "چرا کار نمیکنی؟" # also using u"…." results the same print(text) output: UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2: character maps to <undefined> case 2: text = "چرا کار نمیکنی؟".encode("utf-8") print(text) there … Read more