By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,922 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,922 IT Pros & Developers. It's quick & easy.

Encoding DeprecationWarning

P: n/a
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

Aug 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Sat, 2007-08-04 at 12:07 -0700, ol****@obeattie.com wrote:
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.

--
Carsten Haese
http://informixdb.sourceforge.net
Aug 4 '07 #2

P: n/a
>>from wt.lib.misc_lists import all_countries
__console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file /
Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding
declared; see http://www.python.org/peps/pep-0263.html for details

Aug 4 '07 #3

P: n/a
On Aug 4, 11:43 pm, "oli...@obeattie.com" <oli...@obeattie.comwrote:
>from wt.lib.misc_lists import all_countries

__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

Aug 4 '07 #4

P: n/a
On Sat, 2007-08-04 at 15:52 -0700, ol****@obeattie.com wrote:
On Aug 4, 11:43 pm, "oli...@obeattie.com" <oli...@obeattie.comwrote:
>>from wt.lib.misc_lists import all_countries
__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
Right, that's why I asked you to post the full warning message, to get
you to take another look at it. Mission accomplished ;)

--
Carsten Haese
http://informixdb.sourceforge.net
Aug 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.