Dynamic usage of wchar (Java)

3 posts / 0 new
Last post
Offline
Last seen: 6 years 7 months ago
Joined: 10/10/2012
Posts: 24
Dynamic usage of wchar (Java)

Is there a possible way to use wchar with dynamic participants? I have a regular publisher, generated from an IDL, that uses a wchar in the struct. If I receive samples of this type with a dynamic DataReader, the method get_char returns a corrupt char (ᄈ). Using the method set_char to set the same wchar field results in an exception (RETCODE_ILLEGAL_OPERATION).

Is there a workaround or should I avoid wchar with Java?

gianpiero's picture
Offline
Last seen: 1 year 4 months ago
Joined: 06/02/2010
Posts: 174

 

Hello, 

I think wchar are not supported through the Java implementation of the Dynamic Data APIs. I cannot think of a good workaround.
I just filled a bug about this (CORE-5933)

Regards,
  Gianpiero

Offline
Last seen: 6 years 7 months ago
Joined: 10/10/2012
Posts: 24

Thank you, I just wanted to be sure that I don't miss any feature of the DynamicData API. In this case I will just document that wchars are not yet usable, so that we don't use them in our IDLs.