Products | Versions |
---|---|
TIBCO Streaming | - |
StreamBase Studio and Server use the operating system's character encoding. On Windows this may be UTF-8, or ANSI with a specific code-page such as windows-1252 (ANSI Latin 1), gb2312 (Chinese Simplified), or many others. On Linux the default character encoding is often determined by the locale, and different utilities (bash, python) may at the same time default to other encodings.
Character representation in terminal windows and log files will appear corrupted if displayed with a different encoding than was used to create them. Editing saved files in an editor with the wrong encoding will corrupt them (only characters in the ASCII range will be preserved), preventing them from being reverted to a correct representation later.
How can a consistent character encoding be configured for StreamBase?
<java-vm> <sysproperty name="streambase.tuple-charset" value="UTF-8" /> </java-vm>For additional help, please see the documentation page referenced above.
name = "myengine" version = "1.0.0" type = "com.tibco.ep.streambase.configuration.sbengine" configuration = { StreamBaseEngine = { systemProperties = { "streambase.tuple-charset" = "UTF-8" } } }Place the HOCON configuration file in the src/main/configurations folder.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="RootConsoleAppender" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <charset>UTF-8</charset> <pattern>%d{yyyy-MM-dd HH:mm:ss.}%usecs%d{Z} [%process:%thread] %-5level %logger: %msg%n</pattern> </encoder> </appender> <appender name="utf8logfile" class="ch.qos.logback.core.FileAppender"> <file>${com.tibco.ep.dtm.logging.logDirectory}/${com.tibco.ep.dtm.logging.logFileNamePrefix}_utf8.log</file> <encoder> <charset>UTF-8</charset> <pattern>%d{yyyy-MM-dd HH:mm:ss.}%usecs%d{Z} [%process:%thread] %-5level %logger: %msg%n</pattern> </encoder> </appender> <root> <level value="info"/> <appender-ref ref="RootConsoleAppender" /> <appender-ref ref="utf8logfile" /> </root> </configuration>