Use UTF-8 encoding for nginx plugin#7797
Use UTF-8 encoding for nginx plugin#7797schoen merged 17 commits intocertbot:masterfrom g6123:nginx-utf8
Conversation
|
@ohemorange Hi, it has been a long time. I've checked @schoen's PR, and sadly it was yet far away from recent |
|
Test is failing in 2.7. It is because of certbot/certbot-nginx/tests/parser_test.py Line 493 in d68f37a certbot/certbot-nginx/tests/parser_test.py Line 513 in d68f37a |
|
Back-porting shouldn't be that hard, since there is already an implementation in CPython: |
|
Okay, I've added |
certbot-nginx/tests/testdata/etc_nginx/invalid_unicode_comments.conf
Outdated
Show resolved
Hide resolved
|
Thanks, I added a few comment on this. |
|
Thank you @schoen ! I've added some changes. |
schoen
left a comment
There was a problem hiding this comment.
Thanks a lot @g6123! In addition to looking over the code, I just tested this out on a server and confirmed that it skipped over a configuration file with non-UTF-8 encodings (printing a useful warning on the console). I think this is ready to go.
Based on and supersedes #6725, which was originally based on #5341.
Fixes #5337.
Closes #6725.
Pull Request Checklist
mastersection ofcertbot/CHANGELOG.mdto include a description of the change being made.AUTHORS.mdif you like.