Re: String encoding in Py2.7

2018-05-29 Thread Chris Angelico
On Tue, May 29, 2018 at 8:39 PM, Steven D'Aprano wrote: > On Tue, 29 May 2018 09:19:52 +, Fabien LUCE wrote: > >> May 29 2018 11:12 AM, "Thomas Jollans" wrote: >>> On 2018-05-29 09:55, f...@lutix.org wrote: >>> Hello, Using Python 2.7 (will switch to Py3 soon but Before I'd like to

Re: String encoding in Py2.7

2018-05-29 Thread Steven D'Aprano
On Tue, 29 May 2018 09:19:52 +, Fabien LUCE wrote: > May 29 2018 11:12 AM, "Thomas Jollans" wrote: >> On 2018-05-29 09:55, f...@lutix.org wrote: >> >>> Hello, >>> Using Python 2.7 (will switch to Py3 soon but Before I'd like to >>> understand how string encoding worked) >> >> Oh dear. This

Re: String encoding in Py2.7

2018-05-29 Thread Chris Angelico
On Tue, May 29, 2018 at 5:55 PM, wrote: > Hello, > Using Python 2.7 (will switch to Py3 soon but Before I'd like to understand > how string encoding worked) > Could you please tell me is I understood well what occurs in Python's mind: > in a .py file: > if I write s="héhéhé", if my file is

Re: String encoding in Py2.7

2018-05-29 Thread Fabien LUCE
May 29 2018 11:12 AM, "Thomas Jollans" wrote: > On 2018-05-29 09:55, f...@lutix.org wrote: > >> Hello, >> Using Python 2.7 (will switch to Py3 soon but Before I'd like to understand >> how string encoding >> worked) > > Oh dear. This is probably the exact wrong way to go about it: the >

Re: String encoding in Py2.7

2018-05-29 Thread Thomas Jollans
On 2018-05-29 09:55, f...@lutix.org wrote: > Hello, > Using Python 2.7 (will switch to Py3 soon but Before I'd like to understand > how string encoding worked) Oh dear. This is probably the exact wrong way to go about it: the interplay between string encoding, unicode and bytes is much less

String encoding in Py2.7

2018-05-29 Thread ftg
Hello, Using Python 2.7 (will switch to Py3 soon but Before I'd like to understand how string encoding worked) Could you please tell me is I understood well what occurs in Python's mind: in a .py file: if I write s="héhéhé", if my file is declared as unicode coding, python will store in memory