I have a String with a \"ñ\" character and I have some problems with it. I need to encode this String to UTF-8 encoding. I have tried it by this way, but it doesn\'t work:>
How about using
ByteBuffer byteBuffer = StandardCharsets.UTF_8.encode(myString)