Writing a Carriage Return in Unicode

sturlamolden sturlamolden at yahoo.no
Fri Nov 20 15:37:23 CET 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