I am encountering the error attached
"UnicodeEncodeError: ASCII codec can't encode character u'\0152' in position 124: ordinal not in range(128)" Please help me solve this.....

Recommended Answers

All 4 Replies

If you have a computer made for the US market, you most likely don't have char 0156 (a hex number) in your character set.

Also note that editors like DrPython, SPE and UliPad screw up unicode character sets in their output window. Use PyScripter or ConText to get at least some order into playing with unicode.

In PyScripter you can avoid the error by changing the engine setiing to international.
Click: Run - Python engine - International

commented: Don't bump solved, six year old threads... -1

Don't bump old threads, particularly old solved threads...this one is six years old for goodness sake...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.