Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-117190

By default Liferay should assume that osgi configuration files are encoded in UTF-8

    Details

      Description

      When exporting some settings from Control Panel/System Settings, the resulting OSGi config file will be UTF-8 encoded. However, at next startup, when reading that file, we do not assume that it is UTF-8 encoded (unless module.framework.properties.felix.fileinstall.configEncoding=UTF-8 is set in portal-ext), and therefore special Unicode characters appear wrongly after that (in System Settings, and probably in the DB as well).

      Steps to reproduce/demonstrate the issue:

      1. Start up a vanilla bundle and login as admin.
      2. Go to System Settings/Content and Data section/Display Content and scroll to the Title field towards the bottom. In that text field write (paste) the following text:

      Mit freundlichen Grüßen

      3. Then export this setting. You will obtain a file called com.liferay.iframe.web.internal.configuration.IFramePortletInstanceConfiguration.config, and you can see that it is UTF-8 encoded (I used Notepad++ for checking that)
      4. Stop the server and place that file in osgi/configs, then restart the server.
      5. Go again to System Settings/Content and Data section/Display Content and scroll to the Title field.
      Result: You will see "Mit freundlichen Grüßen", instead of "Mit freundlichen Grüßen". However, if you were to use "module.framework.properties.felix.fileinstall.configEncoding=UTF-8" (or felix.fileinstall.configEncoding=UTF-8 in a system-ext file) before restarting, then the text would be correctly read and displayed on the UI.
      Expected: This setting (module.framework.properties.felix.fileinstall.configEncoding=UTF-8) should be used by default by the DXP server. A DXP server should come with this setting enabled (without customers needing to set it in portal-ext or system-ext.)

        Attachments

          Activity

            People

            Assignee:
            sharry.shi Sharry Shi
            Reporter:
            istvan.dezsi Istvan Dezsi
            Participants of an Issue:
            Recent user:
            Enterprise Release HU
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 7 weeks, 5 days ago

                Packages

                Version Package
                7.1.10 DXP FP19
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP8
                7.2.10.3 DXP SP3
                7.2.X
                7.3.4 CE GA5
                7.3.10 DXP GA1
                Master