We are facing issue while generating unique value using firstname and lastname which has umlaut characters, however for some of the umlaut characters IIQ is skipping some of them (like - Ę)when replacing umlaut with corresponding English letter.
Please let us know if anyone faced this and resolved.
Hi @nileshjain77 ,
try to convert the string with utf-8 standard, with something like this:
String s = "ä ö ü";
byte[] bytes = s.getBytes(StandardCharsets.UTF_8);
String converted = new String(bytes, StandardCharsets.UTF_8);
System.out.println(converted);
1 Like
abartkowski
(Adam Bartkowski)
November 19, 2024, 10:27am
3
Hi,
you could implement kind of StringUtil class for your IIQ.
Like here:
> public class StringUtil {
> public static String stringNormalizer(String str, Identity identity) {
> try {
> ...
> str = replaceHungarianSpecialsCustom(str, identity);
> str = replaceGermanSpecials(str);
> //any other country specific replacements
> ...
> return str;
> } catch (Exception e) {
> log.debug("Error message: ", e);
> return "";
> }
> }
>
> static String replaceGermanSpecials(String str) {
> if (StringUtil.isNullOrEmpty(str)) {
> return "";
> }
> str = str.replace("\u00c4", "Ae");
> str = str.replace("\u00e4", "ae");
> str = str.replace("\u00d6", "Oe");
> str = str.replace("\u00f6", "oe");
> str = str.replace("\u00dc", "Ue");
> str = str.replace("\u00fc", "ue");
> str = str.replace("\u00df", "ss");
> return str;
> }
>
> static String replaceHungarianSpecials(String str) {
> if (StringUtil.isNullOrEmpty(str)) {
> return "";
> }
> str = str.replace("\u00e1", "a");
> str = str.replace("\u00e9", "e");
> str = str.replace("\u00ed", "i");
> str = str.replace("\u00f3", "o");
> str = str.replace("\u0151", "o");
> str = str.replace("\u00fa", "u");
> str = str.replace("\u0171", "u");
> str = str.replace("\u00c1", "A");
> ...
> return str;
> }
>
> }
1 Like
Hello @enistriminsait - Thaks, I’ll try this solution and keep you posted.
1 Like
Hello - I will try this solution, Thanks.
1 Like
system
(system)
Closed
January 18, 2025, 12:04pm
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.