Skip to content

Read and write text files as UTF-8 - #166

Merged
traversaro merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/utf8-generated-files
Oct 9, 2026
Merged

traversaro merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/utf8-generated-files

Conversation

@Tobias-Fischer

Copy link
Copy Markdown
Contributor

On Windows, open() without an encoding uses the locale encoding (cp1252). A package whose package.xml description has a non-ASCII character (e.g. kortex_description's "™") was then written to recipe.yaml as cp1252, and reading that recipe back as YAML (UTF-8) failed:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x99 in position 1023: invalid start byte

This passes encoding="utf-8" to every text-mode open() in vinca (recipes, variants, generated workflows, snapshots, caches, vinca.yaml, additional recipes, the Windows build script). No behaviour change on Linux/macOS, where UTF-8 is already the default.

🤖 Generated with Claude Code

On Windows, open() defaults to the locale encoding (cp1252), so a recipe
whose description contains a non-ASCII character (e.g. kortex_description's
"™") was written as cp1252 and then failed to load as YAML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer
Tobias-Fischer force-pushed the fix/utf8-generated-files branch from 519288e to cc4c9dd Compare October 8, 2026 19:56
@Tobias-Fischer

Copy link
Copy Markdown
Contributor Author

@traversaro this is ready for review

@traversaro
traversaro merged commit 0a3d264 into RoboStack:master Oct 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants