This is my current way of writing to a file. However, I can't do UTF-8?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-05-26T00:12:22Z Indexed on 2010/05/26 0:21 UTC
Read the original article Hit count: 517

Filed under:
|
|
|
f = open("go.txt", "w")
f.write(title)
f.close()

What if "title" is in japanese/utf-8? How do I modify this code to be able to write "title" without having the ascii error?

Edit: Then, how do I read this file in UTF-8?

© Stack Overflow or respective owner

Related posts about python

Related posts about file