String Encoding
To preserve interoperability throughout your enterprise, all strings must use UTF-8 encoding.
- When the TIBCO FTL Java and .NET libraries send messages, all strings are automatically UTF-8 encoded.
- C programs must treat strings in inbound messages as UTF-8 encoded strings.
- C programs must send only UTF-8 encoded strings.
Note: Strings cannot include embedded null characters.
Message: Printable String Form
Programs can convert a message to a printable string. You can output the string to log files, or user output streams. The string does not contain sufficient information to reconstitute the original message.
| Element | Form | Detail |
|---|---|---|
| Message
Nested message |
{field, field, field, field}
|
Curly braces surround a list of fields, separated by commas. (For readability, you may add space characters.) |
| Field (with a value) | data_type:field_name=value
|
Data type, colon, field name, equals symbol, value. |
| Clear field (no value) | The output omits the field entirely. | |
| Array | [val, val, val, val]
|
Square brackets surround array elements, which are separated by commas. (For readability, you may add space characters.) |
| Opaque | <length bytes>
|
Angle brackets surround the length of the opaque data. |
| String | "chars"
|
Double-quotes surround the characters of the string. This representation does not use escape characters. |
| DateTime | yyyy-mm-dd hh:mm:ss.fracZ
|
For more information, see DateTime Values Printable String Form. |
Printable String Example
This example message string has added whitespace to increase readability. (Actual printable strings do not include vertical formatting or indenting.)
{long:myLong=44,
opaque:myOpaque=<128 bytes>,
message:myInner_msg=
{double:a_double_field=5.300000,
string:an_inner_string_field="the inner "value""},
long_array:an_array=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
message_array:a_msg_array=
[{double:a_double_field=5.300021,
string:an_inner_string_field="first inner string"},
{double:a_double_field=123.4506,
string:an_inner_string_field="second inner string"},
{double:a_double_field=72.90927,
string:an_inner_string_field="third inner string"},
{double:a_double_field=17.17017,
string:an_inner_string_field="fourth inner string"},
{double:a_double_field=42.00000,
string:an_inner_string_field="fifth inner string"}]}
Several aspects of this example are noteworthy:
- The second field,
myOpaque, displays a token representing a byte-array. It does not attempt to display the actual bytes in the byte-array. - The third field,
myInner_msg, contains a nested submessage. Curly braces surround the submessage, which in turn has two fields.The second of those two fields in the nested submessage contains a string. The string value is surrounded by double-quote character, and the string itself contains two double-quote characters (around the word
"value"). Those inner double-quote characters are not preceded by an escape character. - The fourth field,
an_array, contains an array. The array values are surrounded by square brackets, and separated by commas. - The fifth field,
a_msg_array, contains an array of 5 messages. Each message contains two fields: a double and a string.