Encoding DeprecationWarning

Discussion in 'Python' started by oliver@obeattie.com, Aug 4, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. On Sat, 2007-08-04 at 12:07 -0700, 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
    Carsten Haese, Aug 4, 2007
    #2
    1. Advertising

  3. Guest

    >>> 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, 2007
    #3
  4. Guest

    On Aug 4, 11:43 pm, "" <> wrote:
    > >>> 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, 2007
    #4
  5. On Sat, 2007-08-04 at 15:52 -0700, wrote:
    > On Aug 4, 11:43 pm, "" <> wrote:
    > > >>> 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
    Carsten Haese, Aug 5, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pierre Rouleau
    Replies:
    7
    Views:
    370
    David Bolen
    Oct 6, 2003
  2. Tim Peters
    Replies:
    2
    Views:
    393
    Pierre Rouleau
    Oct 3, 2003
  3. Tim Peters
    Replies:
    1
    Views:
    331
    Pierre Rouleau
    Oct 3, 2003
  4. Tony Meyer
    Replies:
    3
    Views:
    290
    Pierre Rouleau
    Oct 8, 2003
  5. Ben Finney
    Replies:
    0
    Views:
    426
    Ben Finney
    Oct 20, 2003
Loading...

Share This Page