Character Encoding of Property Files
Property files with the .property extension are used to configure the behavior of SAP Commerce. SAP Commerce Platform reads these files during startup. Character encoding describes how special characters in these files are processed.
Overview
Each character in a file is represented by a specific bit pattern. Conversion between these bit patterns and the corresponding characters is called character encoding. Issues may arise when a file is read with an incorrect character encoding.
For example, when using the ISO 8859-1 encoding, the © character is encoded as the bit sequence 10101001. Decoding the same bit sequence using the ISO 8859-2 encoding results in getting Š.
The example shows that when you read a file and use an incorrect encoding, the resulting content isn't the same as originally written. This may result in getting incorrect keys, or incorrect values. Your intended settings may therefore not take effect, or may have a different effect than expected, or the output may be displayed incorrectly.
Setting Your Encoding
By default, configuration .property files are read using the ISO 8859-1 encoding. You can, however, set other encodings to read these files. Use the Java system hybris.config.file.encoding property and set it to a chosen character encoding that is supported by the Java runtime.
Remember that all property files are read using the same encoding. It isn't possible to set encoding per file either. If the encoding you choose isn't supported by the Java runtime, the default ISO 8859-1 is used instead. Additionally, a warning message is written to the console during startup.