[omniORB] DATA_CONVERSION problem with omniORB 4.1.4

Duncan Grisby duncan at grisby.org
Mon Sep 10 17:18:55 BST 2012


On Mon, 2012-09-10 at 10:55 -0500, Jingdong Sun wrote:

[...]
> I set up both client side and server side with following: 
> omniORB:   nativeCharCodeSet = UTF-8 
> omniORB:   nativeWCharCodeSet = UTF-16 (default) 
> omniORB:   validateUTF8 = 0(default) 
> 
> But, when I tried to call my interface and send a char* with
> multi-bytes characters, I hit following error (with traceLevel=40): 
> omniORB: (?) Invoke 'register_entry' on remote: key<dname> 
> omniORB: (?) throw DATA_CONVERSION from cs-8bit.cc:257
> (NO,DATA_CONVERSION_CannotMapChar) 

[...]
> I wonder when I set nativeCharCodeSet to UTF8: 
> 1. How come I hit this error from cs-8bit.cc? 

It is trying to convert your UTF-8 data to an 8 bit code set, probably
ISO-8859-1. If you have indeed set the server to use UTF-8 as its native
code set, the problem is almost certainly that you are using a corbaloc
URI in the client.

In GIOP/IIOP, the code set information for a server lives in the IOR,
and it is required by the CORBA standard that if an IOR has no code set
information, the client must assume that it only understands ISO-8859-1.
A corbaloc URI is treated the same as an IOR with no code set
information. Your client is therefore under the impression that your
server requires ISO-8859-1 and is trying to convert to that.

> 2. Anything I can do to solve this problem? 

Define an IDL method that the client can call that returns an object
reference. It can even return the same object reference it was invoked
upon. That way, the client will exchange its corbaloc reference (that
has no code set information) with a full IOR, and then it will be able
to transfer UTF-8.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list