You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cz changelog --export-template raises UnicodeDecodeError on a non-ASCII template where the locale is not UTF-8 #2136
cz changelog --export-template reads and writes the template in the locale's encoding. Jinja reads the same template as UTF-8, so a template that renders can fail to export, for example one with Korean text where the locale is EUC-KR.
Steps to reproduce
On Linux with the ko_KR.EUC-KR locale generated, in an empty directory:
UnicodeDecodeError: 'euc_kr' codec can't decode byte 0x80 in position 5: illegal multibyte sequence
Desired behavior
out.md has the same bytes as my.md.j2, as it does under C.UTF-8.
Environment
Commitizen Version: 4.20.1 (master, 4c4b791)
Python Version: 3.14.4 (main, Aug 20 2026, 10:41:58) [GCC 15.2.0]
Operating System: Linux
I have not run cz itself on Windows. On Windows 11 with cp949, Path.read_text() of the same kind of text raises UnicodeDecodeError.
#1854 changed these two lines among others and was closed without a reproducing test. #2119 fixed cz commit --edit and cz init and did not touch them. I would like to send a PR with only these two lines and a test that fails without them, if you agree.
This was found and written with the help of Claude Code.
Activity