Re: [Tutor] Python String and Unicode data types and Encode Decode Functions

2015-12-21 Thread Anshu Kumar
Hi Steven. Thanks a lot for your reply. Now I have some clarity. Could you please confirm if i get it correct? 1. There is an internal encoding of input characters to bytes which depends on python version and os 2. For non unicode types every text gets encoded using point 1 and gets printed usi

Re: [Tutor] Python String and Unicode data types and Encode Decode Functions

2015-12-20 Thread Steven D'Aprano
On Sun, Dec 20, 2015 at 08:17:21AM +0530, Anshu Kumar wrote: > I know certain facts like What version of Python are you using? My *guess* is that you are using Python 2.7, is that correct? What operating system are you using? Windows, Linux, Mac OS X, Unix, something else? > 1. String is not

[Tutor] Python String and Unicode data types and Encode Decode Functions

2015-12-20 Thread Anshu Kumar
Hi Everyone, In my current project I am dealing a lot with unicode type. There are some text files which contain unicode to accommodate data in multiple languages. I have to continuously parse these files in xml or yaml format using xml and yaml libraries. I have encountered several errors due to