Writing a Carriage Return in Unicode

sturlamolden sturlamolden at yahoo.no
Fri Nov 20 09:37:23 EST 2009


On 19 Nov, 01:14, Doug <caldwelli... at verizon.net> wrote:

> Thanks for your help!!

A carriage return in unicode is

   u"\r"

how this is written as bytes is dependent on the encoder.

Don't try to outsmart the UTF-8 codec, it knows how to translate "\r"
to UTF-8.


Sturla Molden



More information about the Python-list mailing list