Class CharsetCESU8

  • All Implemented Interfaces:
    java.lang.Comparable<java.nio.charset.Charset>

    class CharsetCESU8
    extends CharsetUTF8
    The purpose of this class is to set isCESU8 to true in the super class, and to allow the Charset framework to open the variant UTF-8 converter without extra setup work. CESU-8 encodes/decodes supplementary characters as 6 bytes instead of the proper 4 bytes.
    • Constructor Detail

      • CharsetCESU8

        public CharsetCESU8​(java.lang.String icuCanonicalName,
                            java.lang.String javaCanonicalName,
                            java.lang.String[] aliases)
    • Method Detail

      • getUnicodeSetImpl

        void getUnicodeSetImpl​(UnicodeSet setFillIn,
                               int which)
        Description copied from class: CharsetICU
        This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored. Detects Unicode signature byte sequences at the start of the byte stream and returns number of bytes of the BOM of the indicated Unicode charset. 0 is returned when no Unicode signature is recognized.
        Overrides:
        getUnicodeSetImpl in class CharsetUTF8