These changes restore the previous behavior in which the data is decoded
according to a locale specific default charset if the UTF-8 conversion fails.
This allows the method to properly decode both UTF-8 data and data that has
been encoded with the locale default charset (ISO-8859-1 in most cases) without
any charset hints from the source.
The conversion is now a two step process:
1. Convert the stream content to a string using the locale specific encoding.
2. Try reinterpret the data according to UTF-8 rules. If it succeeds, return
the conversion result. If it fails, return the original string.