Revision: 11860
http://sourceforge.net/p/foray/code/11860
Author: victormote
Date: 2021-01-25 21:23:45 +0000 (Mon, 25 Jan 2021)
Log Message:
-----------
Handle the case of an unnamed control character.
Modified Paths:
--------------
trunk/foray/foray-unicode/src/main/java/org/foray/unicode/CodePoint.java
Modified: trunk/foray/foray-unicode/src/main/java/org/foray/unicode/CodePoint.java
===================================================================
--- trunk/foray/foray-unicode/src/main/java/org/foray/unicode/CodePoint.java 2021-01-25 17:34:25 UTC (rev 11859)
+++ trunk/foray/foray-unicode/src/main/java/org/foray/unicode/CodePoint.java 2021-01-25 21:23:45 UTC (rev 11860)
@@ -176,7 +176,11 @@
public String getJavaName() {
String base = this.name;
if ("<control>".equals(base)) {
- base = "CONTROL_" + this.unicode10Name;
+ if ("".equals(this.unicode10Name)) {
+ base = "CONTROL_0x" + Integer.toHexString(this.value);
+ } else {
+ base = "CONTROL_" + this.unicode10Name;
+ }
}
String toReturn = base.toUpperCase(Locale.US);
toReturn = toReturn.replace(" ", "_");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|