[omniORB] Any:wstring handling question ...

Dmitry Samersoff dms at wplus.net
Tue Jun 8 13:21:27 BST 2004


Hi,

I have to receive wstring as Any value from client,
than convert it to UTF-8 string and store it into database.

This code doesn't work:

Any::to_wstring eatup unicode characters

    const CORBA::WChar *value;
		
     (*an) >>=  CORBA::Any::to_wstring(value, 0);
     char *mbs = fromWChar(value);


This code works:

   const void *value = an->value();
   char *mbs = fromUTF16(
     (utf16_t *) ((char*)value+6),  (*(int *) value)-2
   );

What's going wrong ?

-- 
Dmitry Samersoff
dms at samersoff.net, http://devnull.wplus.net
ICQ: 3161705
* There will come soft rains ...




More information about the omniORB-list mailing list