Today I Learned
java string.getBytes("UTF-8") javascript equivalent 본문
JavaScript/자바 -> 노드 Migration 작업
java string.getBytes("UTF-8") javascript equivalent
처니형 2022. 3. 29. 11:18https://stackoverflow.com/questions/22861828/java-string-getbytesutf-8-javascript-equivalent
java string.getBytes("UTF-8") javascript equivalent
I have this string in java: "test.message" byte[] bytes = plaintext.getBytes("UTF-8"); //result: [116, 101, 115, 116, 46, 109, 101, 115, 115, 97, 103, 101] If I do the same thing in javascript:...
stackoverflow.com
자바에서 string.getBytes('UTF-8') 대신 자바스크립트 에서는 TextEncoder()를 이용한다.
'JavaScript > 자바 -> 노드 Migration 작업' 카테고리의 다른 글
| # 톰캣 사용자 설정 (0) | 2022.04.01 |
|---|---|
| ec2-linux 환경설정 마쳤는데 echo 명령어로 alias가 동작 안할 때 (0) | 2022.04.01 |
| The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received type number (4) (0) | 2022.04.01 |
| Base64 Encoding, Decoding 방법 (0) | 2022.03.30 |
| 자바 System.arraycopy를 자바스크립트로 구현 (0) | 2022.03.30 |
Comments