Skip to content

Copier is messing up Umlaut on template update #1963

@laenan8466

Description

@laenan8466

Describe the problem

When entering an Umlaut (ö,ü,ä) to an answer everything is written correctly. But on updating the template, copier is messing it up.

Template

New template with git initialized (and tagged)

{{_copier_conf.answers_file}}.jinja:

# Changes here will be overwritten by Copier
{{ _copier_answers|to_nice_yaml -}}

copier.yml:

umlaut:
  type: str
  help: Type an umlaut (ö,ü,ä).

umlaut.md.jinja:

{{ umlaut }}

To Reproduce

  1. copier copy -d umlaut=ä .\template\ .\test\ (PowerShell)
  2. cd test
  3. git init, git add ., git commit -m 'first'
  4. copier update --trust

Logs

On update you will see:

Updating to template version 0.2.0
🎤 Type an umlaut (ö,ü,ä).
   ä

The .copier-answers.yml-file and the umlaut.md file will be overwritten with ä

Expected behavior

No overwriting. Keep ä in .copier-answers.yml-file and the umlaut.md file

Screenshots/screencasts/logs

No response

Operating system

Windows

Operating system distribution and version

Windows 11

Copier version

9.4.1

Python version

3.13.2

Installation method

local build

Additional context

Independent of build method, here uvx was used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageTrying to make sure if this is valid or not

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions