Using Java I am constructing some XML. In the XML some nodes may have values which are in Korean language or some other language. After constructing, how do I make sure that my whole XML is in UTF-8 encoding? Do I need to explicitly change the string to UTF-8 by using something like:
string = new String(s.getBytes(), "UTF-8");
Or will the whole string be automatically in UTF-8?
Also if I get some XML with some UTF-8 like this <name>[B@19821f<name>, how do I know that [B@19821f is a UTF-8 of some Korean word?