0

I'm running Wildfly 15 and serving a HTML page with a header like this:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">

Special characters like german umlauts which are direct content of this page are displayed correctly.

A jQuery datepicker works not so well, the month 'März' gets broken at the umlaut.

Same happens with other JS resources containing umlauts:

alert('öäü');

Is displayed as '���';

All files in the project are saved as ISO-8859-15 (legacy reasons, cannot be changed!).

Obviously Wildfly is serving the JSs as UTF-8 :-(

I tried setting encoding in standalone-full.xml

<server name="default-server">
    <http-listener name="default" socket-binding="http" url-charset="ISO-8859-15" redirect-socket="https" enable-http2="true"/>
    <https-listener name="https" socket-binding="https" url-charset="ISO-8859-15" security-realm="ApplicationRealm" enable-http2="true"/>
 ...
 <servlet-container name="default" default-encoding="ISO-8859-15" use-listener-encoding="true">

This had no effect on the problem, though.

Any ideas what I'm doing wrong? ;-)

Best regards

Mark.

Markus Fried
  • 96
  • 1
  • 10

1 Answers1

0

Did you try to localize the datepicker component while initializing? If not please refer this

Shreesha
  • 71
  • 2
  • 5
  • yes, the datepicker is correctly localized: $.datepicker.setDefaults($.datepicker.regional['de']); – Markus Fried Mar 13 '19 at 09:16
  • Check [this](https://stackoverflow.com/questions/423693/how-can-i-properly-display-german-characters-in-html) – Shreesha Mar 14 '19 at 08:51
  • see above - the meta tag declares the ISO-8859 encoding already – Markus Fried Mar 15 '19 at 05:23
  • but actually this is exactly my problem: the meta tag sets encoding as ISO-8859, but the Content-Type HTTP header is UTF-8. I tried to set Wildfly encoding in standalong-full.xml (see my question above), but this does not seem to work. What am I missing here? – Markus Fried Mar 15 '19 at 05:35