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

Re: [RESOLVED] Re: \u0000 in literals?

From: Gavin Carothers <gavin@carothers.name>
Date: Mon, 20 May 2013 13:06:51 -0700
Message-ID: <CAPqY83zsWmko5QGi9Z0Z2gR1Hkand9US2_YmA3u8AEdT7Yx6kA@mail.gmail.com>
To: Alex Milowski <alex@milowski.com>
Cc: "Eric Prud'hommeaux" <eric@w3.org>, "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
>From Python the source of much Turtle Syntax:

In Python source code, Unicode literals are written as strings prefixed
with the ā€˜uā€™ or ā€˜Uā€™ character: u'abcdefghijk'. Specific code points can be
written using the \u escape sequence, which is followed by four hex digits
giving the code point. The \U escape sequence is similar, but expects 8 hex
digits, not 4.


On Mon, May 20, 2013 at 1:00 PM, Alex Milowski <alex@milowski.com> wrote:

> Another nuance I seem to have missed.  Using capitalization to
> differentiate seems a bit odd but certainly deterministic.
>
>
> On Mon, May 20, 2013 at 10:55 AM, Eric Prud'hommeaux <eric@w3.org> wrote:
>
>> * 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
>>
>> --
>> -ericP
>>
>
>
>
> --
> --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 20:07:22 UTC

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