Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

hexStringToCodePoint fails for hexString that contains "-" #1

@johnguild

Description

@johnguild

Line 393 of Client.java fails with hexString containing dashm
sample are 1f3c3-2642 , 1f3c3-2640

private String hexStringToCodePoint(String hexString) {
      int codePoint = Integer.parseInt(hexString, 16 );
      return new String(new int[]{codePoint}, 0, 1);
 }

Dunno a workaround so a temporary fallback would be better than showing a shortname, maybe like

 private String hexStringToCodePoint(String hexString) {
    if(hexString.contains("-")){
        String[] parts = hexString.split("-");
        hexString = parts[0];
    }
      int codePoint = Integer.parseInt(hexString, 16 );
      return new String(new int[]{codePoint}, 0, 1);
 }

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