W3C home > Mailing lists > Public > public-rdf-comments@w3.org > May 2013

Re: \u0000 in literals?

From: Eric Prud'hommeaux <eric@w3.org>
Date: Mon, 20 May 2013 13:55:44 -0400
To: Alex Milowski <alex@milowski.com>
Cc: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
Message-ID: <20130520175542.GA9505@w3.org>
* Alex Milowski <alex@milowski.com> [2013-05-20 09:39-0700]
> It appears that tests:
>   turtle-syntax-bad-esc-03.ttl
>   turtle-syntax-bad-esc-04.ttl
> are exactly the same.
> The both have the contents:
> # Bad string escape
> <http://example/s> <http://example/p> "\U0000WXYZ" .
> As far as I can tell, sections 2.5.1 and 6.4 indicate that NUL (U+0000) is
> a perfectly legal character as long as it is escaped via \u0000 or \U0000.

Currently, \u0000 is legal in Turtle (and SPARQL) both in escaped and
raw form.

> Why are these tests marked as negative syntax tests?
> Also, I assume that one of them was to test \u0000 instead of \U0000 ?

One of these tests makes sure that the parser distinguishes between
\uXXXX and \UXXXXXXXX. I don't know why thre are two (does it still
work? how 'bout now?).

There has been some reluctance within the working group to change the
test suite this late in the game. Presuming you are persuaded that
"\U0000WXYZ" is invalid per the Turtle grammar, will you be content
whether or not the WG removes the redundant test? If so, please
respond with [RESOLVED] in the subject.

> -- 
> --Alex Milowski
> "The excellence of grammar as a guide is proportional to the paucity of the
> inflexions, i.e. to the degree of analysis effected by the language
> considered."
> Bertrand Russell in a footnote of Principles of Mathematics

Received on Monday, 20 May 2013 17:56:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:56 UTC