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

cz ch cannot decode Chinese word #826

Closed
pplmx opened this issue Aug 25, 2023 · 2 comments
Closed

cz ch cannot decode Chinese word #826

pplmx opened this issue Aug 25, 2023 · 2 comments

Comments

@pplmx
Copy link

pplmx commented Aug 25, 2023

Description

As title

Steps to reproduce

mkdir test; cd test; git init
touch cc
git add cc; git commit -m "feat: 你好, 世界"
cz ch
cat CHANGELOG.md

Current behavior

cannot parse

Desired behavior

parse in the right way

Screenshots

image

Environment

cz version --report
Commitizen Version: 3.5.3
Python Version: 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Operating System: Windows
@pplmx
Copy link
Author

pplmx commented Aug 25, 2023

If using this, the program even crashed.

mkdir test; cd test; git init
touch cc
git add cc; git commit -m "feat: ハロー・ワールド"
cz ch
cat CHANGELOG.md

error log

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\users\pplmx\.local\bin\cz.exe\__main__.py", line 7, in <module>
  File "C:\Users\pplmx\.local\pipx\venvs\commitizen\Lib\site-packages\commitizen\cli.py", line 463, in main
    args.func(conf, vars(args))()
  File "C:\Users\pplmx\.local\pipx\venvs\commitizen\Lib\site-packages\commitizen\commands\changelog.py", line 193, in __call__
    self.write_changelog(changelog_out, lines, changelog_meta)
  File "C:\Users\pplmx\.local\pipx\venvs\commitizen\Lib\site-packages\commitizen\commands\changelog.py", line 115, in write_changelog
    changelog_file.write(changelog_out)
UnicodeEncodeError: 'gbk' codec can't encode character '\u30fb' in position 45: illegal multibyte sequence

@Lee-W
Copy link
Member

Lee-W commented May 20, 2024

I think this is a duplicate one to #1110. As there's more detail there, let's track this issue there. Thanks for filing the issue!

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

2 participants