Scala - Converting from ISO-8859-1 to UTF-8 gives foreign character strangeness
问题 Here's my problem; I have an InputStream that I've converted to a byte array, but I don't know the character set of the InputStream at runtime. My original thought was to do everything in UTF-8, but I see strange issues with streams that are encoded as ISO-8859-1 and have foreign characters. (Those crazy Swedes) Here's the code in question: IOUtils.toString(inputstream, "utf-8") // Fails on iso8859-1 foreign characters To simulate this, I have: new String("\u00F6") // Returns ö as expected,