Skip to content

Fix layout file writing: UTF-8 and relative path - #47

Merged
sylvestre merged 2 commits into
opencollab:masterfrom
danilovesky:fix-layout-file-writing
Nov 22, 2026
Merged

sylvestre merged 2 commits into
opencollab:masterfrom
danilovesky:fix-layout-file-writing

Conversation

@danilovesky

@danilovesky danilovesky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Two small fixes when saving a layout:

@mergify

mergify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

This pull request is merged.

XMLPersister.store wrote through an OutputStreamWriter in the platform
charset while the XML header declares UTF-8, so on a non-UTF-8 platform
a layout with non-ASCII names could not be read back. Give the
transformer the stream itself, so it encodes as it declares.

Fixes opencollab#45
FilePersistenceHandler.validatePerspectiveFile took the parent of the
file as given, which is null for a relative file such as layout.xml,
so store threw NullPointerException.

Fixes opencollab#46
@danilovesky
danilovesky force-pushed the fix-layout-file-writing branch from 1c1b078 to 622d8ca Compare November 22, 2026 13:32
@danilovesky

Copy link
Copy Markdown
Contributor Author

@sylvestre both your points are valid. They are addressed now.

@sylvestre
sylvestre merged commit 4223a7c into opencollab:master Nov 22, 2026
7 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

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.

FilePersistenceHandler fails for a relative file without a directory Layout XML is written in the platform charset

2 participants