bpmn-io/bpmn-js-example-custom-elements

Special characters from JS not displayed properly

shade-belisar opened this issue · 1 comments

Describe the Bug

Special characters are not properly displayed when set in javascript.

Steps to Reproduce

  1. Clone this example: https://github.com/bpmn-io/bpmn-js-example-custom-elements
  2. Add a special character (Ä) to the text in this line: https://github.com/bpmn-io/bpmn-js-example-custom-elements/blob/master/app/custom/CustomContextPad.js#L66
  3. Install and run as per the instructions in the readme.
  4. Open the context pad and hover over the red icon.

Expected Behavior

The special character should be displayed as entered in the js file.

Environment

  • Browser: Vivaldi | 4.0.2312.38 (Stable channel) stable (64-bit)
  • OS: Linux Mint 20.1 Cinnamon 64-bit
  • Library version: 8.2.2
nikku commented

Thanks for reporting.

This is a matter of serving the content, including the JS app as UTF-8. If we don't do it (and if you don't do it) non ASCII characters end up as gibberish. I've fixed the example via 27cbbd1.

See how the labels translate properly now:

capture iXvEgR_optimized