Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   how to write a unicode string to a file ? (http://www.velocityreviews.com/forums/t701749-how-to-write-a-unicode-string-to-a-file.html)

Stef Mientki 10-15-2009 11:43 PM

how to write a unicode string to a file ?
 
hello,

By writing the following unicode string (I hope it can be send on this
mailing list)

Bücken

to a file

fh.write ( line )

I get the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 9: ordinal not in range(128)

How should I write such a string to a file ?

thanks,
Stef Mientki



All times are GMT. The time now is 04:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.