这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@davefol
Copy link

@davefol davefol commented Mar 4, 2015

Before this addition, writing out to file sometimes threw a

UnicodeEncodeError: 'ascii' codec can't encode character... error.

@dkrasner
Copy link
Contributor

dkrasner commented Mar 5, 2015

thanks for looking into this!

str.encode() will still throw an error if some of the characters can't be encoded as utf-8.

It might be better to add **encode_kwargs to the print_topics() method
and then write with

f.write(outstr.encode(**encode_kwargs))

@davefol
Copy link
Author

davefol commented Mar 17, 2015

I support that Idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants