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

hexStringToCodePoint fails for hexString that contains "-" #1

Open
johnguild opened this issue Mar 11, 2019 · 0 comments
Open

hexStringToCodePoint fails for hexString that contains "-" #1

johnguild opened this issue Mar 11, 2019 · 0 comments

Comments

@johnguild
Copy link

johnguild commented Mar 11, 2019

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);
 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant