jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1457887 - /jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java
Date Mon, 18 Mar 2013 17:31:18 GMT
Author: andy
Date: Mon Mar 18 17:31:18 2013
New Revision: 1457887

URL: http://svn.apache.org/r1457887
Log:
Add surrogate pair characters to accepted PN_CHARS_BASE.
This assumes the string is already checked as being legal (i.e. correct high-low surrogate
pairs).

Modified:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java?rev=1457887&r1=1457886&r2=1457887&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/system/RiotChars.java Mon Mar 18
17:31:18 2013
@@ -71,6 +71,9 @@ VARNAME        ::=  ( PN_CHARS_U  | [0-9
 PN_CHARS       ::=  PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
 PN_PREFIX      ::=  PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)?
 PN_LOCAL       ::=  ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
+
+//  "high surrogates" (D800–DBFF) "low surrogates" (DC00–DFFF).
+Notes: PN_CHARS_BASE has a hole above #xD800 -- these are the  surrogate pairs 
      */
     
     public static boolean isPNCharsBase(int ch)
@@ -82,7 +85,10 @@ PN_LOCAL       ::=  ( PN_CHARS_U | [0-9]
         return 
             r(ch, 'a', 'z') || r(ch, 'A', 'Z') || r(ch, 0x00C0, 0x00D6) || r(ch, 0x00D8,
0x00F6) || r(ch, 0x00F8, 0x02FF) ||
             r(ch, 0x0370, 0x037D) || r(ch, 0x037F, 0x1FFF) || r(ch, 0x200C, 0x200D) || r(ch,
0x2070, 0x218F) ||
-            r(ch, 0x2C00, 0x2FEF) || r(ch, 0x3001, 0xD7FF) || r(ch, 0xF900, 0xFDCF) || r(ch,
0xFDF0, 0xFFFD) ||
+            r(ch, 0x2C00, 0x2FEF) || r(ch, 0x3001, 0xD7FF) ||
+            // Surrogate pairs
+            r(ch, 0xD800, 0xDFFF) ||
+            r(ch, 0xF900, 0xFDCF) || r(ch, 0xFDF0, 0xFFFD) || 
             r(ch, 0x10000, 0xEFFFF) ; // Outside the basic plain. 
     }
     



Mime
View raw message