How to enable UTF8 support for BusinessEvents Docker images

How to enable UTF8 support for BusinessEvents Docker images

book

Article ID: KB0072104

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 6.x

Description

By default, UTF8 encoding will not be enabled when you use be-tools to build a Docker image of your BusinessEvents application. For details, refer to the issue on GitHub entitled "Configure UTF-8 file encoding (java env) to avoid encoding issues".

This can cause issues if your application needs to handle data that contains UTF8 characters.

Resolution

To enable UTF8 support, set the JAVA_TOOL_OPTIONS environment variable in your Dockerfile as follows:
 
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"

To determine your current file encoding settings, you may add a simple startup RuleFunction to print this information to the console. For example:
 
String[] variableType = {"java.lang.String"};
String[] variablenName = {"file.encoding"};
String sret=System.execJava("java.lang.System","getProperty",variableType, null, variablenName);
System.debugOut(" ### Java file encoding set to:" + sret);

Issue/Introduction

Describes the steps needed to enable support for UTF8 when running your BusinessEvents application as a Docker image.