Pushing out 1.11 plus fixing #158

63 views
Skip to first unread message

Charles Nutter

unread,
Sep 27, 2012, 4:54:35 PM9/27/12
to snakeya...@googlegroups.com
I have investigated a recent JRuby bug report and narrowed it down to how SnakeYAML emits nonprintable Unicode characters, specifically characters in the supplemental range (U+10000 to U+10FFFF).

My bug is here:


There are related fixes that are already on head. My fix largely just forces all unprintable characters to be encoded (as the spec says...regardless of allowUnicode) and encodes UTF-16 surrogate pairs as a single 32-bit escape (\UXXXXXXXX instead of \uXXXX\uXXXX). All tests pass.

We are hoping to push JRuby 1.7RC2 or final very soon, so I'm wondering about the possibility of getting a 1.11 release out, with my patch in place. It seems it has been a while since a SnakeYAML release. I'm not sure what the status of the repository is right now.

- Charlie

Andrey

unread,
Sep 28, 2012, 6:45:47 PM9/28/12
to snakeya...@googlegroups.com
Dear Charlie,
according to spec http://yaml.org/spec/1.1/#escaping%20in%20double-quoted%20style/

Note that escape sequences are only interpreted in double-quoted scalars.

We do not have enough information to see the scope of your request.
Please provide tests which meet these criteria:
- the tests must fail without the fix
- the tests must succeed with the fix
- the tests must cover all the new code (all the new code must be called in at least one test)

Andrey

P.S.
Open Source is all about communication. Unfortunately the communication with JRuby developers leaves much to be desired.

http://ruby.11.n6.nabble.com/Communication-with-SnakeYAML-developers-td4979488.html

Charles Oliver Nutter

unread,
Sep 28, 2012, 8:11:14 PM9/28/12
to snakeya...@googlegroups.com
On Fri, Sep 28, 2012 at 3:45 PM, Andrey <py4...@gmail.com> wrote:
> Dear Charlie,
> according to spec
> http://yaml.org/spec/1.1/#escaping%20in%20double-quoted%20style/
>
> Note that escape sequences are only interpreted in double-quoted scalars.
>
> We do not have enough information to see the scope of your request.
> Please provide tests which meet these criteria:
> - the tests must fail without the fix
> - the tests must succeed with the fix
> - the tests must cover all the new code (all the new code must be called in
> at least one test)

Ok, I will provide a test that shows supplementary characters are not
being encoded properly.

> P.S.
> Open Source is all about communication. Unfortunately the communication with
> JRuby developers leaves much to be desired.
>
> http://ruby.11.n6.nabble.com/Communication-with-SnakeYAML-developers-td4979488.html

Yes, sorry about that. I believe I have answered all your queries now
though, yes?

- Charlie

Charles Oliver Nutter

unread,
Sep 28, 2012, 8:19:44 PM9/28/12
to snakeya...@googlegroups.com
On Fri, Sep 28, 2012 at 5:11 PM, Charles Oliver Nutter
<hea...@headius.com> wrote:
> On Fri, Sep 28, 2012 at 3:45 PM, Andrey <py4...@gmail.com> wrote:
>> We do not have enough information to see the scope of your request.
>> Please provide tests which meet these criteria:
>> - the tests must fail without the fix
>> - the tests must succeed with the fix
>> - the tests must cover all the new code (all the new code must be called in
>> at least one test)
>
> Ok, I will provide a test that shows supplementary characters are not
> being encoded properly.

I have updated the patch with a test: https://gist.github.com/3796362

- Charlie
Reply all
Reply to author
Forward
0 new messages