Class MrzEncoder

    • Field Detail

      • LENGTH_RESTRICTION

        public static final int LENGTH_RESTRICTION
        Length restriction.
        See Also:
        Constant Field Values
      • CHAR_MAPPINGS

        public static final Map<Character,​String> CHAR_MAPPINGS
        Character mappings
    • Constructor Detail

      • MrzEncoder

        public MrzEncoder()
    • Method Detail

      • encode

        public static String encode​(String input)
        Encodes the supplied string to a MRZ encoded string.

        This means removing all accents, mapping/expanding characters according to CHAR_MAPPINGS, converting the string to uppercase, and finally to replace all spaces and non-supported characters with the '<' char.

        Parameters:
        input - the name to encode
        Returns:
        the MRZ encoded string