Skip to content

Commit 682bcc8

Browse files
adam-grant-hendryLee-W
authored andcommitted
docs: add encoding configuration
1 parent f3ed157 commit 682bcc8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/config.md

+9
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ Default: `[]`
184184

185185
Calls the hook scripts **after** bumping the version. [Read more][post_bump_hooks]
186186

187+
### `encoding`
188+
189+
Type: `str`
190+
191+
Default: `utf-8`
192+
193+
Sets the character encoding to be used when parsing commit messages. [Read more][encoding]
194+
187195
## Configuration file
188196

189197
### pyproject.toml or .cz.toml
@@ -357,3 +365,4 @@ setup(
357365
[customization]: customization.md
358366
[shortcuts]: customization.md#shortcut-keys
359367
[annotated-tags-vs-lightweight]: https://stackoverflow.com/a/11514139/2047185
368+
[encoding]: tutorials/writing_commits.md#writing-commits

docs/tutorials/writing_commits.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Now to the important part, when writing commits, it's important to think about:
2323
You may think this is trivial, but it's not. It's important for the reader to
2424
understand what happened.
2525

26+
Emojis may be added as well (e.g. see [cz-emoji][cz_emoji]), which requires the `utf-8`, or equivalent, character encoding to support unicode characters. By default, `commitizen` uses the `utf-8` character encoding, but a different encoding may be set through the `encoding` [configuration option][configuration].
27+
2628
### Recommendations
2729

2830
- **Keep the message short**: Makes the list of commits more readable (~50 chars).
@@ -40,3 +42,5 @@ understand what happened.
4042

4143
[customization]: ../customization.md
4244
[conventional_commits]: https://www.conventionalcommits.org
45+
[cz_emoji]: https://commitizen-tools.github.io/commitizen/third-party-commitizen/#cz-emoji
46+
[configuration]: ../config.md#encoding

0 commit comments

Comments
 (0)