I am creating string (by concatanation of input string and some predefined text), save it into database and pass it to the following method:
public String decodeUTF(String inputString) {
byte[] bytes = StringUtils.getBytesUtf8(inputString);
return StringUtils.newStringUtf8(bytes);
}
When i call (and send result to front(android)) :
decodeUTF("Emoji example: \uD83D\uDE04");
it works (shows smilies) .
When i call
decodeUTF(sameStringFromDb);
it passes whole string whithout conversion.