R
R
Rienopely2015-09-16 15:42:56
Java
Rienopely, 2015-09-16 15:42:56

How to convert a Java file to another encoding?

There is an admissible file in Java hell knows in what encoding. How to convert it using Java tools to UTF-8 so that the Cyrillic alphabet is without kryakozyabr?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2015-09-16
@rienopely

For example:

String res = new String( src.getBytes("ISO-8859-1"),"Cp1251");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question