Skip to content

Missing UTF-32 charset should fail only in case UTF-32 is detected #121

@danielkec

Description

@danielkec

Right now UTF-32 chaset is looked up for unicode version detection during class initialization, no matter whether there will be ever any use of it:

class UnicodeDetectingInputStream extends FilterInputStream {
private static final Charset UTF_32LE = Charset.forName("UTF-32LE");
private static final Charset UTF_32BE = Charset.forName("UTF-32BE");

Actual lookup should be done lazily when UTF-32 is actually detected to support runtimes without UTF-32, like GraalVM native image oracle/graal/issues/1294

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions