cancel
Showing results for 
Search instead for 
Did you mean: 

National characters and new Java API

Former Member
0 Kudos

Hi All,

I'm looking for your experience with new java api and national characters (like: ü, ś, ć, etc.). The problem is that when record was updated using MDM Data Manager, and retrieved using new java api - national character are invalid (in java string the national character are represented incorrectly).

It's strange due to fact that when I create or update this record from java API it's looks fine. Second finding is that old java api (MDM4J) works fine on text fields with national characters.

Maybe I forget to set something in server configuration / repository / or on java api connection - any help appreciated...

Regards, marcin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

While retrieving data via the Java API 2,

you should set the Unicode Normalization after the user session is authenticated.

I guess this is available in SP5 patch.

The documentation for this is available at

https://help.sap.com/javadocs/MDM/current/index.html

Package: com.sap.mdm.commands

SetUnicodeNormalizationCommand cmd = new SetUnicodeNormalizationCommand(connectionAccessor);

cmd.setSession(userSession);

<b>cmd.setNormalizationType</b>(SetUnicodeNormalizationCommand.NORMALIZATION_COMPOSED);

cmd.execute();

This command is used to set the Unicode normalization. This is used for the lifetime of the session. It should be set after the session is authenticated.

Unicode normalization is important when a text string is represented differently depending on the normalization used. The MDM server always store text strings in one normalization format. An user providing a text string to the MDM server and later on tries to retrieve back the same text string might get the text string back in a different normalization. To resolve this issue, the user can use this class to specify the normalization the user wants to work with. The MDM server will always return text strings in the normalization specified by this class.