Details
Description
The JBehave HTML reports are created using encoding "ISO-8859-1".
Normally there should be no problems with umlauts when using this encoding. But nevertheless my umlauts in the story name are not shown correctly when opening the JBehave reports.html file in a browser. This is why the link to the details of the result for that story is broken.
If I change the browser encoding to "UTF-8", the umlaut is displayed correctly
Why does this occur? Because my Eclipse project is set to UTF-8 to be used as default encoding and JBehave uses in its HTML generation template hardcoded "ISO-8859-1".
JBehave produces this line in the HTML and the browser displays it initially in this encoding:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Some ideas to improve this:
Instead of "charset=ISO-8859-1" it could be used "charset=UTF-8".
Or it could be made configurable via the MostUsefulConfiguration.
Activity
Field | Original Value | New Value |
---|---|---|
Affects Version/s | 3.9.1 [ 19830 ] | |
Fix Version/s | 3.9.1 [ 19830 ] |
Summary | HTML report: "charset=ISO-8859-1" not suitable for all use cases | Allow configuration of report view encoding |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Made encoding configurable via StoryReporterBuilder view properties.
Configuration.storyReporterBuilder().viewResources().setProperty("encoding","UTF-8")
Updated LocalizedStories in i18n examples to show its use.