dashorst opened a new issue, #1953: URL: https://github.com/apache/wicket/issues/1953
Wicket determines the character encoding of a markup file from the XML declaration, `<?xml version="1.0" encoding="UTF-8"?>`. HTML5 markup doesn't have that declaration; it declares its encoding with `<meta charset="utf-8">`, which Wicket ignores and falls back to the default encoding. ## Where `wicket-util/src/main/java/org/apache/wicket/util/io/XmlReader.java`. It reads the start of the stream, looks for the `<?xml … encoding=… ?>` declaration with a regular expression, and creates the reader with that encoding. ## Done when - When there's no XML declaration, a `<meta charset="…">` near the start of the file sets the encoding. Decide (and say in the pull request) what happens when both are present, and how far into the file to look. Also consider the older `<meta http-equiv="Content-Type" content="text/html; charset=…">` form. - Tests in `wicket-util/src/test/java/org/apache/wicket/util/io/XmlReaderTest.java`. ## Background Originally reported as [WICKET-5357](https://issues.apache.org/jira/browse/WICKET-5357) (Wicket 6.8). A committer pointed to `XmlReader` as the place for the change. --- Part of #1945. This issue is meant for a first contribution to Wicket. To work on it, leave a comment so others know; a claim without a pull request lapses after two weeks. Questions are welcome, here on the issue or on [email protected]. Start your branch from `master`, and see [Send a pull request to Wicket](https://wicket.apache.org/contribute/wicket-pull-request.html) for building and testing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
