Class DoubleByteUtil


  • public class DoubleByteUtil
    extends Object
    Utilities for working with double byte CodePages.

    Provides constants for understanding numeric codepages, along with utilities to translate these into Java Character Sets.

    • Field Detail

      • BIG5

        public static final Charset BIG5
      • DOUBLE_BYTE_CHARSETS

        public static final Set<Charset> DOUBLE_BYTE_CHARSETS
    • Constructor Detail

      • DoubleByteUtil

        public DoubleByteUtil()
    • Method Detail

      • cp950ToString

        public static String cp950ToString​(byte[] data,
                                           int offset,
                                           int lengthInBytes)
        This tries to convert a LE byte array in cp950 (Microsoft's dialect of Big5) to a String. We know MS zero-padded ascii, and we drop those. There may be areas for improvement in this.
        Returns:
        Decoded String