Re: Mapping of IDL to Java runtime check [message #12511] |
Thu, 13 August 1998 00:00 |
Nat Pryce
Messages: 1 Registered: August 1998
|
Junior Member |
|
|
Alexander Bj�rneheim wrote:
>
> Hello!
>
> I'm having trouble with passing String data from Java to a Corba
> component. When my Java String data contains swedish national characters
> �,�,� I get a CORBA::DATA_CONVERSION error. I've found in an OMG
> document section 'Mapping of OMG IDL to Java' that IDL characters ar
> 8-bits while Java characters are 16-bit Unicode. The OMG document says
> that 'range checking for characters in the string shall be done at
> marshal time'. I guess that the national characters falls is of range
> for the IDL characters.
>
> My question is how do I write this check in Java? How do I convert
> Unicode so I fits IDL characters?
Can't you use a CORBA wstring? That gets mapped directly to
a Java string and can contain international character sets.
Cheers,
Nat.
--
+------------------------------------------+---------------- -----+
| Name: Nat Pryce MEng ACGI | Dept. of Computing, |
| Email: np2@doc.ic.ac.uk | Imperial College, |
| Tel: +44 (0)171 594 8394 | 180 Queen's Gate, |
| Fax: +44 (0)171 581 8024 | London SW7 2BZ, |
| WWW: http://www-dse.doc.ic.ac.uk/~np2 | United Kingdom |
+------------------------------------------+---------------- -----+
|
|
|