← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #187508]: UnicodeEncodeError when writing data into text file

 

Question #187508 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/187508

    Status: Open => Answered

RaiMan proposed the following answer:
import codecs
fname = "absolute-path-to-your-file"
f = codecs.open(fname, encoding='utf-8', mode = 'w')
f.write(u'blah \u2019 blah blah blah\n')
f.close()

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.