Translation does not show non-ASCII characters correctly

Mah*_*ari 1 sapui5 ui5-tooling

I have a SAPUI5 application. The translated text is shown wrongly in a dialog, while the translation is shown correct in the launchpad. Please see the following picture:

在此处输入图片说明

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

How can I solve it?

Bog*_*ann 5

尝试在工具配置文件中设置/resources/configuration/propertiesFileSourceEncodingUTF-8(通常为ui5.yaml)。

  1. ui5.yaml

    resources:
      configuration:
        propertiesFileSourceEncoding: UTF-8
    
    Run Code Online (Sandbox Code Playgroud)
  2. 并在package.json

    "devDependencies": {
      "@ui5/cli": "<at least 1.7.0>",
      ...
    },
    
    Run Code Online (Sandbox Code Playgroud)
  3. 重新生成并再次部署该应用程序。


关于 propertiesFileSourceEncoding

此选项指定*.properties项目文件的源编码。这些文件将以给定的编码读取,所有非ASCII字符将替换为相应的unicode转义序列。(文件)