Re: Python and Unicode

2014-04-10 Thread Tim Chase
On 2014-04-10 04:47, wxjmfa...@gmail.com wrote: > Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit : > > On 09/04/2014 09:07, wxjmfa...@gmail.com wrote: > > > > > Well, there is a (serious) problem somewhere... > > > jmf > > > > Look in a mirror and you'll see it as it'll be staring

Re: Python and Unicode

2014-04-10 Thread wxjmfauth
Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit : > On 09/04/2014 09:07, wxjmfa...@gmail.com wrote: > > > Well, there is a (serious) problem somewhere... > > > > > > jmf > > > > > > > Look in a mirror and you'll see it as it'll be staring you in the face. > > > > -- > > M

Re: Python and Unicode

2014-04-09 Thread Steve Hayes
On Wed, 9 Apr 2014 01:07:20 -0700 (PDT), wxjmfa...@gmail.com wrote: >Well, there is a (serious) problem somewhere... As there is with pandas and infertility. -- Terms and conditions apply. Steve Hayes hayesm...@hotmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and Unicode

2014-04-09 Thread Mark Lawrence
On 09/04/2014 09:07, wxjmfa...@gmail.com wrote: Well, there is a (serious) problem somewhere... jmf Look in a mirror and you'll see it as it'll be staring you in the face. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawren

Python and Unicode

2014-04-09 Thread wxjmfauth
Well, there is a (serious) problem somewhere... jmf -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and unicode

2010-09-20 Thread Martin v. Loewis
Am 20.09.2010 12:57, schrieb Dotan Cohen: > On Mon, Sep 20, 2010 at 12:20, Peter Otten <__pete...@web.de> wrote: >> It may work by accident, if you declare it as UTF-8, because that is also >> the default in Python 3. >> > > That does seem to be the case. > > Thank you for the enlightenment and i

Re: Python and unicode

2010-09-20 Thread Dotan Cohen
On Mon, Sep 20, 2010 at 12:20, Peter Otten <__pete...@web.de> wrote: > It may work by accident, if you declare it as UTF-8, because that is also > the default in Python 3. > That does seem to be the case. Thank you for the enlightenment and information. -- Dotan Cohen http://gibberish.co.il h

Re: Python and unicode

2010-09-20 Thread Peter Otten
Dotan Cohen wrote: > On Mon, Sep 20, 2010 at 05:42, Steven D'Aprano > wrote: >>> Use the PEP 263 encoding >>> declaration http://www.python.org/dev/peps/pep-0263/> to let Python >>> know the encoding of the program source file. >> >> While PEPs are valuable, once accepted or rejected they become

Re: Python and unicode

2010-09-20 Thread Dotan Cohen
On Mon, Sep 20, 2010 at 05:42, Steven D'Aprano wrote: >> Use the PEP 263 encoding >> declaration http://www.python.org/dev/peps/pep-0263/> to let Python >> know the encoding of the program source file. > > While PEPs are valuable, once accepted or rejected they become historical > documents. They

Re: Python and unicode

2010-09-20 Thread Goran Novosel
Can't believe I missed something as simple as u'smt', and I even saw that on many occasions... Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and unicode

2010-09-19 Thread Steven D'Aprano
On Mon, 20 Sep 2010 09:09:31 +1000, Ben Finney wrote: > Goran Novosel writes: > >> # vim: set encoding=utf-8 : > > This will help Vim, but won't help Python. It will actually -- the regex Python uses to detect encoding lines is documented, and Vim-style declarations are allowed as are Emacs

Re: Python and unicode

2010-09-19 Thread Carl Banks
On Sep 19, 4:09 pm, Ben Finney wrote: > Goran Novosel writes: > > # vim: set encoding=utf-8 : > > This will help Vim, but won't help Python. Use the PEP 263 encoding > declaration http://www.python.org/dev/peps/pep-0263/> to let Python > know the encoding of the program source file. That's funny

Re: Python and unicode

2010-09-19 Thread Ben Finney
Goran Novosel writes: > # vim: set encoding=utf-8 : This will help Vim, but won't help Python. Use the PEP 263 encoding declaration http://www.python.org/dev/peps/pep-0263/> to let Python know the encoding of the program source file. # -*- coding: utf-8 -*- You can use the bottom of the fi

Re: Python and unicode

2010-09-19 Thread Martin v. Loewis
> One more thing, is there some mechanism to avoid writing all the time > 'something'.decode('utf-8')? Yes, use u'something' instead (i.e. put the letter u before the literal, to make it a unicode literal). Since Python 2.6, you can also put from __future__ import unicode_literals at the top of

Python and unicode

2010-09-19 Thread Goran Novosel
Hi everybody. I've played for few hours with encoding in py, but it's still somewhat confusing to me. So I've written a test file (encoded as utf-8). I've put everything I think is true in comment at the beginning of script. Could you check if it's correct (on side note, script does what I intende