[omniORB] GIOP version matching in codeSets.cc

Stan Switzer stan at adobe.com
Wed Jun 25 16:15:41 BST 2003


Why does the codeset matching logic in codeSets.cc consider the version?

codeSets.cc:
    if (tcs->id() == id && versionMatch(tcs->giopVersion(), v))
      return tcs;

and why is the codeset comparison exact rather than version-or-better?

static inline _CORBA_Boolean
versionMatch(GIOP::Version v1, GIOP::Version v2)
{
  return (v1.major == v2.major && v1.minor == v2.minor);
}

A consequence of the current logic is that omniORB will not recognize UTF-16 wide characters unless the sender is using GIOP 1.2 exactly. 

cs-UTF-16.cc:
  TCS_W_UTF_16()
    : omniCodeSet::TCS_W(omniCodeSet::ID_UTF_16, "UTF-16",
    omniCodeSet::CS_Other, omniCodeSetUtil::GIOP12)

In particular, it will not accept Unicode wide strings from 1.1 clients.

Thanks,

Stan Switzer,
Adobe Systems


More information about the omniORB-list mailing list