afs opened a new issue, #3868:
URL: https://github.com/apache/jena/issues/3868

   Bad surrogates (i.e. a lone surrogate, a low-high or high-high pair) are 
illegal. Only valid surrogate pairs are accepts by the Turtle family of parsers.
   
   An "RDF String" does not allow surrogates.
   
   For Java strings, supplementary characters are stored as two `char` but when 
writing them out to UTF-8, they are one codepoint, 3 or more bytes.
   Any other use of surrogates is illegal.
   
   When printing, the JDK uses `?` as replacement character. (This is inside 
class java library class `UTF_8.Encoder`.)
   
   It would be better to print the Unicode replacement character U+FFFD. This 
is what comes in if a raw surrogate is found (encoded) in a UTF-8 
stream.(surrogates are illegal in UTF-8).
   
   Print in escaped form for clarity -- `\uFFFD` -- and not rely on a font with 
a defined glyph for U+FFFD.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to