This content has been marked as final. Show 2 replies
Just look at the Javadoc for the String class. There is a version of getBytes() that takes a String specifying the encoding. There is a Constructor that takes the bytes and a String specifying the encoding. Just make sure you use the same encoding for both. Since utf-8 covers all characters then just use "utf-8" as the encoding for both then it will work anywhere.
aha thanks a bunch, works like a charm now :)