Encoding DeprecationWarning

O

oliver

Hey There,

Sorry if I am missing something here, but I get a DeprecationWarning
when importing a list which has some unicode characters in it (it's a
list of countries -- it's being raised on Åland), and I am left
wondering why. I am using the syntax u' to denote a unicode string.

If anyone would be so kind; what am I doing wrong?

Many Thanks,
Oliver
 
C

Carsten Haese

Hey There,

Sorry if I am missing something here, but I get a DeprecationWarning
when importing a list which has some unicode characters in it

Please copy and paste the full text of the warning.
 
O

oliver

__console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file /
Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding
declared; seehttp://www.python.org/peps/pep-0263.htmlfor details

OK, well; no matter. Perhaps I should try actually reading the article
it recommended and add:

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

To the file! What a doofus!

Thanks,
Oliver
 
C

Carsten Haese

OK, well; no matter. Perhaps I should try actually reading the article
it recommended

Right, that's why I asked you to post the full warning message, to get
you to take another look at it. Mission accomplished ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top