[rfc][icedtea-web] Console Output Encoding Fix

Jiri Vanek jvanek at redhat.com
Wed Jul 16 15:35:21 UTC 2014


On 07/16/2014 05:18 PM, Omair Majid wrote:
> * Jie Kang <jkang at redhat.com> [2014-07-16 10:28]:
>> +            s = byteStorage.toString("UTF-8");
>
> How do you know that the byte array being written is in UTF-8? Is this a
> safe assumption?

Well this is tricky :(


On one side java is iinternally utf8, so it is most safe assumption of unsafe assumptions.

I even think it is better then usage of platform default encoding.

But it is second in queue in my mind, and others may think differently.
>
>> +        } catch (UnsupportedEncodingException e) {
>> +            s = byteStorage.toString();
>
> If utf8 is missing from the JDK, I would like to think we are screwed.
>
Can it? I doubt ...

J.,




More information about the distro-pkg-dev mailing list