Fixed: Values encoding on Windows#1414
Conversation
e231204 to
9948a60
Compare
Explicitly set the encoding to utf-8 when reading the context file to ensure values are correctly loaded.
9948a60 to
e55467b
Compare
|
@agateau thank you for contribution. You commit merged to master branch. You can test it there, as well as many features that will be available in cookiecutter 2.0 With cookiecutter 2.0 we want to extend windows support, so if you find any windows related bugs please report. Also you can make a great help with review of existing windows related issues, and maybe introducing some bugfixes. |
|
Thanks for merging this fix. Unfortunately I am not a Windows expert: I do most of my work on Linux, I just want it to work on Windows. Getting that one-liner done took a long time (and much cursing!). My 2 cents regarding encoding (again as a mostly Linux user, sometimes dabbling on other platforms) would be: standardize on every file being utf-8, but do not assume it is the default encoding on the OS, so always specify it. |
When using
cookiecutteron the cookiecutter I am working on (https://github.com/agateau/cookiecutter-qt-app) and using the default values except for selecting the MIT license, the author name appeared wrongly encoded both in the prompt default value and in the generated LICENSE file.Explicitly setting the encoding to utf-8 when reading the context file fixes this.
This only happens on Windows for me: the added test pass with or without the fix on Linux, but fails without the fix on Windows.