Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -752,7 +752,9 @@ public DynamicObject stringFromCodepointSimple(long code, DynamicObject encoding
}

protected boolean isSimple(int code, DynamicObject encoding) {
return EncodingOperations.getEncoding(encoding) == ASCIIEncoding.INSTANCE && code >= 0x00 && code <= 0xFF;
final Encoding enc = EncodingOperations.getEncoding(encoding);

return (enc.isAsciiCompatible() && code >= 0x00 && code < 0x80) || (enc == ASCIIEncoding.INSTANCE && code >= 0x00 && code <= 0xFF);
}

}

0 comments on commit 975f5fc

Please sign in to comment.