Search code examples
sapui5ui5-tooling

Translation does not show non-ASCII characters correctly


I have a SAPUI5 application.

The translated text is shown incorrectly in a dialog, while the translation is shown correct in the launchpad. Please see the following picture:

enter image description here

While the translation file is loaded for German language, it does not show [ÖÄÜß] correctly in the dialog. However it does show ö correctly in the launchpad page.

How can I solve it?


Solution

  • Try setting /resources/configuration/propertiesFileSourceEncoding to UTF-8 in the tooling configuration file (typically ui5.yaml).

    1. In ui5.yaml:

      resources:
        configuration:
          propertiesFileSourceEncoding: UTF-8
      
    2. And in package.json:

      "devDependencies": {
        "@ui5/cli": "<at least 1.7.0>",
        ...
      },
      
    3. Re-build and deploy the app again.


    About propertiesFileSourceEncoding

    This option specifies the source encoding of *.properties files of the project. Those files will be read in the given encoding and any non-ASCII characters replaced with the respective unicode escape sequences. (doc)