RFR: 8065138 - Encodings.isRecognizedEnconding sometimes fails to recognize 'UTF8'

Mandy Chung mandy.chung at oracle.com
Wed Nov 19 23:49:16 UTC 2014

On 11/19/2014 12:50 PM, Daniel Fuchs wrote:
> On 11/19/14 9:36 PM, Mandy Chung wrote:
>> resources.jar will be gone when we move to the modular runtime image 
>> (JEP 220 [1]).
>> JDK-8065138 and JDK-8065365 will become non-issue in JDK 9.
> Do you mean that the property files will no longer be stripped of 
> their comments?

(sorry for my delay in reply as I was trying to get the number of the 
resources in the modular image vs resources.jar but got distracted.)

The current version copies all bytes when generating the modular image. 
This is a good question whether we should strip off the comments when 
writing to the modular runtime image.   I think we should look at the 
footprint and any performance saving and determine if we should do the 
same in JDK 9.


> This is what is causing the issue. 'sed' doesn't like the special 
> character.
> -- daniel
>> Mandy
>> [1] http://openjdk.java.net/jeps/220
>> On 11/19/2014 10:15 AM, Daniel Fuchs wrote:
>>>> Isn't that a bug in the build system that really ought to be fixed?
>>>> If properties files are to be stored as resources in jar files, they
>>>> should either be incorporated byte-for-byte identical, or they should
>>>> be decoded using ISO-8859-1 (as specified).  It may be best to leave
>>>> non-ASCII characters in the source files, as a "test" of the build
>>>> system and the jdk itself.
>>> Hmmm. If the character is indeed legal then you're right, fixing
>>> the build is probably a better idea.
>>> However the issue seems to be with using 'sed' over property files:
>>> If I simply do:
>>>   cat 
>>> jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.properties 
>>> | sed 's,x,x,g'
>>> on my machine, it balks with:
>>> sed: RE error: illegal byte sequence 

More information about the core-libs-dev mailing list