Is there an easy way to avoid dealing with text encoding problems?
If you are starting off with a String you can also do the following:
new ByteArrayInputStream(inputString.getBytes("UTF-8"))