翻译未正确显示非 ASCII 字符

Translation does not show non-ASCII characters correctly

我有一个 SAPUI5 应用程序。

翻译后的文本在对话框中显示不正确,而翻译在启动板中显示正确。请看下图:

虽然加载了德语翻译文件,但它没有在对话框中正确显示 [ÖÄÜß]。但是它确实在启动板页面中正确显示 ö

我该如何解决?

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

  1. ui5.yaml:

    resources:
      configuration:
        propertiesFileSourceEncoding: UTF-8
    
  2. package.json中:

    "devDependencies": {
      "@ui5/cli": "<at least 1.7.0>",
      ...
    },
    
  3. 重新构建并再次部署应用程序。


关于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)