name = caffé
print name
Python gave me an error on print: ascii' codec can't encode character u'\xe9' in position 5: ordinal not in range(128)
pythononmac 0 Newbie Poster
Recommended Answers
Jump to Postname = caffé
print nameDon't you mean :
name="caffé"
Jump to PostThis works on my Windows machine ...
# -*- coding: iso-8859-15 -*- # check encoding in http://www.python.org/dev/peps/pep-0263/ # print strings with unicode characters name = 'café' print(name) """ my output …
All 7 Replies
pythononmac 0 Newbie Poster
jlm699 320 Veteran Poster
pythononmac 0 Newbie Poster
Gribouillis 1,391 Programming Explorer Team Colleague
jice 53 Posting Whiz in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
pythononmac 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.