Lisp HUG Maillist Archive

CORBA codeset question

Hi,

We've got an application here where we need to send Unicode text over a
CORBA interface served from Lispworks.

Here are the things we've tried:

* Using narrow strings:  The remote side (Java in this case) encodes the
  strings into Latin-1, and Lispworks interprets them as such.  If Java
  tries to write a code point over 255, it gets an exception on the Java
  side.

* Using wide strings:  Doesn't work at all.  Java gets this exception:

  [java] WARNING: "IOP00500001: (INV_OBJREF) wchar Code Set support not specified"
  [java] org.omg.CORBA.INV_OBJREF:   vmcid: OMG  minor code: 1 completed: No
  [java]     at com.sun.corba.se.impl.logging.OMGSystemException.noServerWcharCodesetCmp(OMGSystemException.java:2217)
  [java]     at com.sun.corba.se.impl.logging.OMGSystemException.noServerWcharCodesetCmp(OMGSystemException.java:2239)
  [java]     at com.sun.corba.se.impl.encoding.CDROutputObject.createWCharCTBConverter(CDROutputObject.java:248)
  [java]     at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.getWCharConverter(CDROutputStream_1_0.java:1800)
  [java]     at com.sun.corba.se.impl.encoding.CDROutputStream_1_1.write_wstring(CDROutputStream_1_1.java:122)
  [java]     at com.sun.corba.se.impl.encoding.CDROutputStream.write_wstring(CDROutputStream.java:156)

It's my (possibly false) understanding that the CORBA server side is 
supposed to tell the client what external format to use to communicate
with it.  Given the error from the wide string example and an
examination of the IOP network traffic, I'd say that's likely.

Now, I found some likely stuff with apropos that hints that the
Lispworks ORB should support different character sets:

CL-USER> (apropos "CODESET")
[selected results]
CORBA::*WCHAR-CODESET* -- value: #<CORBA Codeset: UTF-16>
CORBA::*STANDARD-CODESET-PACKET* -- value: (#<CORBA Codeset: UTF-8> . #<CORBA Codeset: UTF-16>)
ORBA::*CHAR-CODESET* -- value: #<CORBA Codeset: UTF-8>
[lots of other results that look like codeset internal snipped]

However it doesn't appear that it ever tells the other side that it
wants UCS-2 for the wchar external format, given the Java exception
above.

To try to convince it to talk UTF-8 with narrow chars, I tried inserting
the following before op:orb_init:

  (setf corba::*char-codeset* (make-instance 'corba::utf-8)
        (car corba::*standard-codeset-packet*) corba::*char-codeset*)

This also didn't change anything.

I've (obviously) not found anything in the documentation about this.

Is there a way to work around these problems, or am I out of luck?

-bcd
-- 
*** Brian Downing <bdowning at lavos dot net> 


Re: CORBA codeset question

On Fri, Mar 24, 2006 at 04:57:40PM -0600, Brian Downing wrote:
> It's my (possibly false) understanding that the CORBA server side is 
> supposed to tell the client what external format to use to communicate
> with it.  Given the error from the wide string example and an
> examination of the IOP network traffic, I'd say that's likely.

Er, proofreading is good.  This should sayL

> Given the error from the wide string example and an examination of the
> IOP network traffic, I'd say it's likely that Lispworks is not doing
> this.

-bcd


Updated at: 2020-12-10 08:48 UTC