Skip to content

[BUGFIX] Ensure the right encoding - #429

Merged
simonschaufi merged 2 commits into
FriendsOfTYPO3:mainfrom
chrissonntag:bugfix/xliff-umlaut-encoding
Jul 14, 2026
Merged

[BUGFIX] Ensure the right encoding#429
simonschaufi merged 2 commits into
FriendsOfTYPO3:mainfrom
chrissonntag:bugfix/xliff-umlaut-encoding

Conversation

@chrissonntag

Copy link
Copy Markdown
Contributor

This PR fixes #428 by ensuring that the encoding is set to UTF-8 if not yet set properly in the respective xliff files. In general there may be 2 ways of not having the right encoding set:

  • either the xliff file does not contain any xml tag like <?xml ... ?> at all
  • or the encoding-attribute is missing or empty, like so for example <?xml encoding=""?> or <?xml version="1.0"?>

- Default to UTF-8 when the document has no encoding, so characters like
  umlauts stay literal instead of being written as numeric entities
Comment thread packages/fractor-xliff/tests/XliffEncoding/XliffEncodingTest.php Outdated
- Convert XliffEncodingTest to the shared doTestFile/yieldFilesFromDirectory approach
- Migrate encoding fixtures to the input/expected split .xlf.fixture format
- Assert exact serialized output so non-ASCII characters stay literal without numeric entities
- Drop the bespoke runner wiring and manual temp-file handling in favor of AbstractFractorTestCase
@simonschaufi
simonschaufi merged commit a7ad574 into FriendsOfTYPO3:main Jul 14, 2026
36 checks passed
@simonschaufi

Copy link
Copy Markdown
Collaborator

thank you!

@chrissonntag
chrissonntag deleted the bugfix/xliff-umlaut-encoding branch July 14, 2026 12:21
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.

[BUG] Fractor changes umlauts to html encoded values

2 participants