티스토리 뷰
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
'공부' 카테고리의 다른 글
[Jenkins] variable (0) | 2020.05.17 |
---|---|
[Java] `StringUtils.join` + `big Arrays` = `OutOfMemory` (0) | 2020.05.17 |
[Java] encoding in server (0) | 2020.05.17 |
[Spark] `spark.executor.extraJavaOptions` log4j.xml (multi options) (0) | 2020.05.17 |
[JS] convert bytes array to image (0) | 2020.05.17 |
[JS] check isEmpty (0) | 2020.05.17 |
댓글