Skip to content

cz bump - Overwrites my cz.yaml emoji #1164

Description

@syepes

Description

When I run a cz bump it overwrites my config file .cz.yaml and changes all my emojis to there \U* equivalents

Steps to reproduce

  1. .cz.yaml File with any link of 🚀
  2. cz bump --increment PATCH
  3. look at the file .cz.yaml 🚀 can been converted to \U0001F680

Current behavior

it's changing all the emojis

Desired behavior

Leave the emojis untouched

Screenshots

Before bump
CleanShot 2024-06-20 at 3  28 14@2x

After bump
CleanShot 2024-06-20 at 3  26 49@2x

Environment

# cz version                            
3.27.0

# python3 -V
Python 3.12.3

# python3 -c "import platform;print(platform.system())"
Darwin

Activity

  1. Lee-W commented on Aug 11, 2024

    @Lee-W
    Member

    I "guess" this might be something related to encoding or the lib yaml. But could you please share the config you're using in text for us to try to reproduce? Thanks!

  2. bearomorphism commented on May 9, 2026

    @bearomorphism
    Collaborator

    Triage from #1964: Confirmed still valid on master (4.15.1). commitizen/config/yaml_config.py (line 69) calls yaml.dump(config_doc, yaml_file, explicit_start=True) without allow_unicode=True, so PyYAML escapes non-ASCII characters into \Uxxxx. Two-line fix; tagging as good first issue material.

  3. bearomorphism commented on May 9, 2026

    @bearomorphism
    Collaborator

    Verification update (re #1964)

    Reproduced against current master (4.15.1):

    .cz.yaml before bump:

    commitizen:
      name: cz_conventional_commits
      version: 0.1.0
      tag_format: "v$version"
      bump_message: "🚀 chore(release): bump $current_version to $new_version"

    After cz bump --increment PATCH --yes:

    ---
    commitizen:
      bump_message: "\U0001F680 chore(release): bump $current_version to $new_version"
      name: cz_conventional_commits
      tag_format: v$version
      version: 0.1.1

    The emoji 🚀 is escaped to \U0001F680.

    Verdict: STILL VALID. Two-line fix in commitizen/config/yaml_config.py:69:

    yaml.dump(config_doc, yaml_file, explicit_start=True, allow_unicode=True)

    Same change should be applied at commitizen/config/yaml_config.py:33 (init_empty_config_content) for consistency.

    Suitable as a good first issue.

  4. added a commit that references this issue on May 9, 2026
    855b8dd
  5. added a commit that references this issue on May 9, 2026
    b404143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions