Fix Unicode corruption in sample YAML name generation#570
Merged
sinaatalay merged 2 commits intorendercv:mainfrom Dec 23, 2025
Merged
Fix Unicode corruption in sample YAML name generation#570sinaatalay merged 2 commits intorendercv:mainfrom
sinaatalay merged 2 commits intorendercv:mainfrom
Conversation
|
I, Martín Gaitán, on behalf of all people around the world whose names contain non-ASCII characters, thank you for this fix. |
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug that mangled non-ASCII characters in the name field of the sample YAML produced by rendercv new (for example, "Matías" became "MatÃas").
Root cause
An unnecessary encode/decode using "unicode-escape" in the sample generator caused UTF-8 bytes to be mis-decoded. The problematic code was in sample_generator.py.
What I changed
Removed the incorrect transformation:
And assigned the provided name directly to the model.
Tests / Verification
Added unit test: test_creates_model_with_unicode_name
Ran the sample-generator tests to ensure no regressions.
Impact
Backward-compatible bugfix.
Fixes the rendercv new YAML output.
Fixes any generated filenames using the name placeholder.
How to reproduce / validate locally
Run rendercv new and provide a name with accents (e.g., "Matías", "José", etc).
Check the generated .yaml file to ensure the name is rendered correctly.
Run the test suite:
just test