Re: [Tutor] Decode and Encode

2015-01-28 Thread Sunil Tech
Thank you for all your replies​​ On Wed, Jan 28, 2015 at 4:56 PM, Steven D'Aprano wrote: > On Wed, Jan 28, 2015 at 03:05:58PM +0530, Sunil Tech wrote: > > Hi All, > > > > When i copied a text from web and pasted in the python-terminal, it > > automatically coverted into unicode(i suppose) > > >

Re: [Tutor] Decode and Encode

2015-01-28 Thread Steven D'Aprano
On Wed, Jan 28, 2015 at 03:05:58PM +0530, Sunil Tech wrote: > Hi All, > > When i copied a text from web and pasted in the python-terminal, it > automatically coverted into unicode(i suppose) > > can anyone tell me how it does? > Eg: > >>> p = "你好" > >>> p > '\xe4\xbd\xa0\xe5\xa5\xbd' It is hard

Re: [Tutor] Decode and Encode

2015-01-28 Thread Chris Warrick
On Wed, Jan 28, 2015 at 10:35 AM, Sunil Tech wrote: > Hi All, > > When i copied a text from web and pasted in the python-terminal, it > automatically coverted into unicode(i suppose) > > can anyone tell me how it does? > Eg: p = "你好" p > '\xe4\xbd\xa0\xe5\xa5\xbd' o = 'ªîV' o >

[Tutor] Decode and Encode

2015-01-28 Thread Sunil Tech
Hi All, When i copied a text from web and pasted in the python-terminal, it automatically coverted into unicode(i suppose) can anyone tell me how it does? Eg: >>> p = "你好" >>> p '\xe4\xbd\xa0\xe5\xa5\xbd' >>> o = 'ªîV' >>> o '\xc2\xaa\xc3\xaeV' >>> ___