UTF-16 encoding line breaks?

Richard richardd at hmgcc.gov.uk
Wed Jun 11 08:36:50 EDT 2003


Hi,

I have a script which uses the .encode('UTF-16') function to encode a string
into UTF-16. However I am having difficulties in putting line breaks into
that string. \n is what I normally use but does not appear to become valid
UTF-16 once encoded. Can anyone tell me what escape command I can use in my
string to ensure that I get line breaks in my UTF-16 endoded output?

Thanks

Richard






More information about the Python-list mailing list