I have a plain Java String (ofc in UTF-16 encoding). How can I convert this String into Windows-1251 encoding and then get bytes of it, or convert UTF-16 bytes to Windows-1251 bytes?
Asked
Active
Viewed 1,409 times
0
another-programmer
- 841
- 13
- 37
-
possible duplicate of [Encode String to UTF-8](http://stackoverflow.com/questions/5729806/encode-string-to-utf-8) – Paco Abato Feb 03 '15 at 07:42
-
Thanks, didn't notice it – another-programmer Feb 03 '15 at 07:50
-
Answer is here - http://stackoverflow.com/questions/5729806/encode-string-to-utf-8 I userd `Charset.forName()` – another-programmer Feb 03 '15 at 07:50