We need a reusable program to encode/decode text to unicode value as represented in Java and vice-versa.
Input: "hola"
Output: "\u0068\u006f\u006c\u0061"
Input: "\u0068\u006f\u006c\u0061"
Output: "hola"
- Please note that unicode values have always a backslash
\
the letteru
and 4 hexadecimal digits corresponding to the value in the unicode character set. - Codewars has some trouble showing non ASCII characters so perhaps you should try it locally first.