Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #124144 - make jvm give the same output as moar
Handle negative points as well as out of range.
  • Loading branch information
coke committed Apr 28, 2015
1 parent 0fbba5f commit 547d08a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -6189,9 +6189,13 @@ public static String getuniname(long codePoint, ThreadContext tc) {
String name;
int cp = (int) codePoint;
try {
name = Character.getName(cp);
if(name == null) {
name = "<unassigned>";
if(codePoint < 0) {
name = "<illegal>";
} else {
name = Character.getName(cp);
if(name == null) {
name = "<unassigned>";
}
}
} catch (IllegalArgumentException iae) {
name = "<unassigned>";
Expand Down

0 comments on commit 547d08a

Please sign in to comment.