-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
it looks like the sources make a lot of assumptions that files are encoded in utf-8. I guess that's the norm on Unix? It's typically not common on Windows, as the system default file encoding is not utf-8. I'm not entirely sure what to say as regards portability, though. "You should always use utf-8" is possibly a bit strong.
So far, I've been doing fixes in the code on a case by case basis, but it might actually be better to clean up the whole encoding model properly. Maybe let a template declare what encoding it uses and have cookiecutter read using that encoding and write using the user's preferred encoding (defaulting to the OS standard, but settable in .cookiecutterrc). That's harder to do, as the changes will affect a number of parts of the code, but it would likely be cleaner conceptually. I'll think about this a bit once all the changes I've been bombarding you with have settled down...
+1 on exploring this and cleaning up the encoding model. I'm starting a new ticket to track this. It may be good to prioritize this ticket early (0.7.3 or 0.8.1, depending on when @michaeljoseph's extra context work is ready), before we get too deep in new feature work.
@pfmoore you have a stronger understanding of this than I, so feel free to take the lead here.