Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dependency on kitchen #4

Open
mjdecker opened this issue May 31, 2016 · 1 comment
Open

Added dependency on kitchen #4

mjdecker opened this issue May 31, 2016 · 1 comment

Comments

@mjdecker
Copy link
Contributor

I added a dependency on the library kitchen (everything but the sink 😄).

Python has a general problem with writing Unicode out to buffers. If you write out Unicode that contains non-ascii, it is not happy. Kitchen provides several common code snippets that are useful in may scenarios. One of these is code to handle Unicode/Byte strings. I am using the to_bytes to convert Unicode into python type str before writing them out to the buffer. This avoids exceptions being thrown.

For more information on kitchen and unicode/str problem see:
http://pythonhosted.org/kitchen/
http://pythonhosted.org/kitchen/unicode-frustrations.html

Thanks to @dtg3 for pointing this library out to me. I use it quite a lot now.

@mjdecker
Copy link
Contributor Author

Need to have the dependency installed on setup.

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

No branches or pull requests

1 participant