Skip to main content

Information about Unicode

  • February 16, 2013
  • 0 replies
  • 0 views

Problem:

  • Product Name: Visibroker
  • Product Version: 5.x and above
  • Product Component: Unicode
  • Platform: All

Do we need to change IDL file so as to use wstring instead of string type?

Is there some ways to achieve support for Unicode in string type?

Resolution:

Visibroker supports Unicode according to OMG Language mapping specification (C & IDLtoJava).

VisiBroker default native codeset for char is ISO 8859_1, and for wchar and wstring is UTF-16.

All codesets which are compatible with these 2 codesets are also supported.

To be more precise, ASCII is supported for char/strings & UCS-2 Level 1 for wchar/wstrings.

Conversion of codesets is not supported for VBC .

But VBJ supports UTF-8 as the conversion codesets for char.

================================

A brief introduction on codesets:

ISO 8859_1(Latin1 codeset): Extends ASCII. 8-bit encoding includes most western European languages.

-----------UCS-------------

UCS-2 code set: 2 bytes encoding per character

UCS-4 code set: 4 bytes encoding per character

---------- Unicode ---------

UTF-16: 2 bytes encoding for commonly used characters, 4 bytes encoding for others. Compatible with UCS-2.

UTF-32: 4 bytes encoding per character. Compatible with UCS-4.

UTF-8: variable length of 1 to 4 bytes encoding. Compatible with ASCII.

Unicode characters corresponding to the familiar ASCII set have the same byte values as ASCII.

For C , string is mapped to char* and wstring is mapped to wchar*, and refer to supported codesets (see above) for char/string and wchar/wstring, UTF-16 (Unicode/16 bits) is not for char (8 bits) but for wchar (16 bits). As the charset of UCS-2 Level 1 is compatible with UTF-16, UCS-2 Level 1 is also supported for both VisiBroker for Java and VisiBroker for C .

Please also take note that in 6.0, UTF-8 is not supported in VBC60 but is in VBJ60.

From VB 8.5 onwards, the native code set for char can be changed to UTF-8 by setting the property "vbroker.orb.ncsc=UTF8". Refer to Borland VisiBroker 8.5 Release Notes.

 


#VisiBroker
#UTF8
#Security
#unicode
#codeset