Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.11, 2.2
-
None
-
Patch available
-
Blocks: HTML - 1.0.0-M1
-
Blocks: HTML
Description
The NekoHTMLTransformer uses the cyberneko HTMLConfiguration for tidying html. Unfortunately it does not use the system's current encoding as default, instead you have to set a property to set your encoding. But this varies from one OS to another, so the best solution is to set this property automatically in the NekoHTMLTransformer depending on what Java uses as defaultCharset:
config.setProperty("http://cyberneko.org/html/properties/default-encoding", Charset.defaultCharset().name());
config.setProperty("http://cyberneko.org/html/properties/default-encoding", Charset.defaultCharset().name());