A
A
artshelom2016-10-13 22:38:07
Java
artshelom, 2016-10-13 22:38:07

How to convert a line?

Help a newbie!!
There is a line
String s = "\u044e\u043b\u0438\u043d\u044b_\u0441\u043a\u0430\u0437\u043a\u0438";
How to transcode it into Russian???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Vitrenko, 2016-10-13
@Vestail

These are escape sequences, the compiler itself "recodes" them.

class Test {
  public static void main(String... args) {
    String s = "\u044e\u043b\u0438\u043d\u044b_\u0441\u043a\u0430\u0437\u043a\u0438";
    System.out.println(s);
  }
}

R
Rou1997, 2016-10-13
@Rou1997

These are Unicode character numbers, it is not the compiler that decodes, but the JVM, when executed, and the compiler, on the contrary, encodes the Cyrillic alphabet into this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question