[ 
https://issues.apache.org/jira/browse/JCR-5153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17959780#comment-17959780
 ] 

Julian Reschke edited comment on JCR-5153 at 6/11/25 4:15 PM:
--------------------------------------------------------------

Conversion from UCS-2 (UTF-16) to UTF-8 can fail. In Java, what happens depends 
on the encoder (replacement strings or throwing exceptions).

Unpaired surrogates are evil, and we never should have allowed them in JCR.

For additional fun, read:

https://simonsapin.github.io/wtf-8/


was (Author: reschke):
Conversion from UCS-2 (UTF-16) to UTF-8 can fail. In Java, what happens depends 
on the encoder (replacement strings or throwing exceptions).

Unpaired surrogates are evil, and never should have allowed them in JCR.

For additional fun, read:

https://simonsapin.github.io/wtf-8/

> Text.escapeIllegalJcrChars(String) does not escape all illegal JCR characters
> -----------------------------------------------------------------------------
>
>                 Key: JCR-5153
>                 URL: https://issues.apache.org/jira/browse/JCR-5153
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 2.23.1
>            Reporter: Konrad Windszus
>            Priority: Major
>
> The grammar at 
> https://s.apache.org/jcr-2.0-spec/3_Repository_Model.html#3.2.2%20Local%20Names
>  defines which characters are valid within a local JCR name. However the 
> method {{Text.escapeIllegalJcrChars(String)}} does not properly escape:
> # unicode characters which are outside the char range defined by 
> https://www.w3.org/TR/xml/#NT-Char



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to