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

Andy Seaborne commented on JENA-459:
------------------------------------

\u005A is fine - example should be \u00FC which is ΓΌ

{noformat}
    public static void main(String ...args)
    {
        Triple t = SSE.parseTriple("(<s> <p> '\\u00FC')") ;
        Graph g = GraphFactory.createGraphMem() ;
        g.add(t) ;
        System.out.println("# N-Triples:") ;
        RDFDataMgr.write(System.out, g, Lang.NTRIPLES) ;
        System.out.println("# Turtle:") ;
        RDFDataMgr.write(System.out, g, Lang.TURTLE) ;
        System.out.println("#") ;
    }
{noformat}

(caution: To add to the fun, "\u00FC" in Java  is one character - the language 
itself does \u processing)
                
> Literals in ntriples not unicode escaped
> ----------------------------------------
>
>                 Key: JENA-459
>                 URL: https://issues.apache.org/jira/browse/JENA-459
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RDF API
>    Affects Versions: Jena 2.10.1
>         Environment: everywhere
>            Reporter: Pascal Christoph
>            Assignee: Andy Seaborne
>            Priority: Minor
>
> Unicode escaped characters like "\u005A" are string of 1 character and should 
> be rendered as such when file encoding is UTF8 . Serializing ntriples, this 
> is working for such escaped characters residing in URIs, but when used in 
> literals the escaping is ignored. Thus, in literals "\u005A" is written as a 
> string of 6 characters rather than a string of one, while in URIs there is 1 
> character. 
> Using e. G. 'RDFDataMgr.write(System.out, model, Lang.TURTLE) the same model 
> results as expected, though. The problem just arises when using NTriples .

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to