공부
[Java] encoding in server
승가비
2020. 5. 17. 05:27
728x90
import static java.nio.charset.StandardCharsets.*;
byte[] ptext = subject.getBytes(ISO_8859_1);
subject = new String(subject, UTF_8);
mail.setSubject(subject);
https://stackoverflow.com/questions/5729806/encode-string-to-utf-8
Encode String to UTF-8
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: byte ptext[] = myString.get...
stackoverflow.com
728x90