Internationalization support

Adaptive Server version 15.0.2 ESD #1 and later supports internationalization between Adaptive Server and the messaging bus for both sending and receiving messages, such as when:

Examples

Example 1 Sets the current character set, then sends a Chinese word to messaging bus in one Adaptive Server using the GB18030 character set:

1> sp_configure "default character set id"
2> go
Parameter Name       Default Memory Used Config Value Run Value Unit  Type
---------------      --------------- ----------- ---------- --------- ----
default character set id  1            0          173       173  id  static

(1 row affected)
(return status = 0)

1> declare @msg varchar(1024)
2> select @msg = 0xd6d0cec4
3> select msgsend(@msg,'ibm_mq:channel1/TCP/host1(7654)?
   qmgr=QM,queue=Q1,alter_user=yes',message property "formatName=MQSTR")

Example 2 Receives the Chinese message from messaging bus in another Adaptive Server, which is running the Big5 character set:

1> sp_configure "default character set id"
2> go
Parameter Name       Default  Memory Used  Config Value  Run Value  Unit  Type
--------------- --------- ----------- ------------ ------------ ----- -------
default character set id   1            0           161        161 id static
(return status = 0)
1> declare @msg varchar(1024)
2> select @msg = msgrecv('ibm_mq:channel1/TCP/host1(7654)?
   qmgr=QM,queue=Q1,alter_user=yes',
3> option 'bufferLength=100k,timeout=60000',
4> returns varchar(16384))
5> select convert(varbinary(1024), @msg)
6> go
-----------------------------------------------------------------------------
0xa4a4a4e5

The output, “0xa4a4a4e5,” is the binary representation of the word “CHINESE” in the Chinese language in the Big5 character set.