472,096 Members | 2,285 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

Encoding DeprecationWarning

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
4 1371
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
>>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
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
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.

Similar topics

18 posts views Thread by Klaus Alexander Seistrup | last post: by
77 posts views Thread by Gerrit Holl | last post: by
reply views Thread by Chris McDonough | last post: by
5 posts views Thread by Dan Jacobson | last post: by
1 post views Thread by ujjwaltrivedi | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.