Translation does not show non-ASCII characters correctly

こ雲淡風輕ζ 提交于 2019-12-11 06:11:39

问题


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?


回答1:


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)



来源:https://stackoverflow.com/questions/58834203/translation-does-not-show-non-ascii-characters-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!