I found lots of questions about this topic but i was not able to solve my issue.
User will put a name String
and I need to transform it to a List<int>
to save it in database representing each character of the name.
It is working with latin wring system but this need to be working with other writing system such as arabic or cyrillic script.
List<Integer> intName = new ArrayList<>();
String splitName = currentName.split("");
for (final String currentString : splitConferenceName) {
final byte[] temp = currentString.getBytes(StandardCharsets.UTF_8);
final Byte b = temp[0];
intName.add(b.intValue());
}
I also try to use ByteBuffer but got Bufferunderflowexception.
To check if the operator was good or not, I use this website : https://onlinestringtools.com/convert-decimal-to-string