Linked Questions

190 votes
6 answers
575k views

I am writing a Python 3.3 program to send some data to a webpage using POST method. Mostly for debugging process I am getting the page result and displaying it on the screen using print() function. ...
Carlos Eugenio Thompson Pinzón's user avatar
26 votes
2 answers
22k views

Happy examples: #!/usr/bin/env python # -*- coding: utf-8 -*- czech = u'Leoš Janáček'.encode("utf-8") print(czech) pl = u'Zdzisław Beksiński'.encode("utf-8") print(pl) jp = u'リング 山村 貞子'.encode("...
Ericson Willians's user avatar
24 votes
4 answers
30k views

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: ...
Soorena's user avatar
  • 4,480
14 votes
5 answers
19k views

I'm working on a python application that can print text in multiple languages to the console in multiple platforms. The program works well on all UNIX platforms, but in windows there are errors ...
yonix's user avatar
  • 12.4k
7 votes
3 answers
33k views

I have following code: # -*- coding: utf-8 -*- print u"William Burges (1827–81) was an English architect and designer." When I try to run it from cmd. I get following message: Traceback (most ...
user2904150's user avatar
6 votes
2 answers
3k views

Possible Duplicate: Python, Unicode, and the Windows console I read some strings from file and when I try to print these utf-8 strings in windows console, I get error UnicodeDecodeError: 'ascii' ...
Meloun's user avatar
  • 15.3k
3 votes
2 answers
2k views

Possible Duplicate: Python, Unicode, and the Windows console I have a folder with a filename "01 - ナナナン塊.txt" I open python at the interactive prompt in the same folder as the file and attempt to ...
Tom Whittock's user avatar
  • 4,238
1 vote
1 answer
2k views

I am running Windows 7 and its console has been configured to use Consolas font, which gives me a possibility of Unicode output. The ability to read Unicode in console has been proved by me many times ...
Paul's user avatar
  • 26.8k
1 vote
2 answers
3k views

I am trying to get what a person says in Arabic and then print that to the terminal. When I try to speak to the mic, any Arabic word I say gets printed as ???? with the number of question marks ...
sami's user avatar
  • 25
0 votes
1 answer
3k views

I have an Arabic unicode string that I want to print in Python (using Python(x,y) on Windows 7), but I can't get it to print, only the unicode representation is printed out. The string is defined as: ...
Mohamed Aly's user avatar
1 vote
0 answers
2k views

I'm trying to convert a JSON text file into a python object (and also print the text to the console) I'm getting an error to do with encoding characters. I'm using Python 3.6.5 and Windows Powershell ...
sytup's user avatar
  • 87
0 votes
1 answer
681 views

I'm processing the following xml file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <tag>…</tag> Just like python documentation says: import xml.etree.cElementTree as ET ...
Dejwi's user avatar
  • 4,497
0 votes
2 answers
846 views

I am working on a json file with Chinese words in it. I try to read it in my machine with Python, but the Chinese characters just can't be correctly displayed. Here is the json file(a.json): { "...
Cody Gao's user avatar
0 votes
1 answer
821 views

I used Python2.7 to do this but I always got the same error when I try to insert the '€' symbol in my code. My OS system is windows 10. When I run this code: dic = { '\\' : b'\xe2\x95\x9a', '-' : b'...
Federico Lolli's user avatar
0 votes
1 answer
503 views

I was trying to load a .json file. This file is an English word dictionary that contained a lot of Unicode like \u266f. By using encoding = "utf8" can not solve the error. Then I replaced all of the ...
Ahnaf's user avatar
  • 53

15 30 50 per page
1
2 3 4 5
10