Plex Java - Allow resource loading from specified charset / encoding

Idea created by plexcat on Oct 17, 2015
    New
    Score7
    • JavierRuiz
    • Jorge Quincke
    • jeubeda
    • joseignaciolazaro
    • plexcat
    • richard.lacroix
    • michael_iten

    Need an option in  ObCient.properties files to specify the charset/encoding of the resource files (.panelresource, .resource)

     

    Example:

     

    ResourceFileEncoding=ISO-8859-1

     

    Background:

     

    According to the Java Standard resource files should be encoded in ISO-8859-1 (characters not included in ISO-8859-1 have to be unicode escaped). Most Java apps developed today are using UTF-8 nevertheless.

     

    Plex Runtime uses the Java default encoding to load resource files. On a Windows machine this works in most cases.

    BUT when we move an application to Linux we run into problems. Linux will assume UTF-8 encoding as the default. As a workaround we can start a VM under Linux with the -Dfile.encoding=ISO-8859-1. This works as long as the Plex application is the only application in a container. If we deploy an app to let's say to an existing instance of Tomcat, we are out of luck.

     

     

    Option should be added to all .properties files (Obsvr.properties,Obusr.properties,ObClient.properties. Option also allows to convert the Plex generated resource files to UTF-8 and then use ResourceFileEncoding=UTF-8 on WIndows.

     

    Plex Runtime should never rely on a Java default encoding. This is just bad practice and is a Java design flaw.