Skip Menu |
 

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 17574
Status: resolved
Priority: 0/
Queue: YAML-Syck

People
Owner: Nobody in particular
Requestors: aaron [...] sysdev.oucs.ox.ac.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.30
Fixed in: (no value)



Subject: Problem with strings ending in ':' and ' '
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 871
Download (untitled) / with headers
text/plain 871b
YAML:Syck doesn't seem to correctly encode strings that end with either a ':' or a ' ' e.g Dump('a:') will give --- a: which is wrong as it should be --- 'a:' Similarly there is a problem with strings ending in space. As a fix, either use the syck_scan_scalar from emitter.c in the Syck CVS or apply the following patch: --- emitter.c (revision 7113) +++ emitter.c (revision 7249) @@ -575,6 +575,14 @@ flags |= SCAN_MANYNL_E; } + /* ending colons */ + /* These are the wrong flag codes, but have the correct affect */ + if ( cursor[len-1] == ':' ) { + flags |= SCAN_INDIC_S; + } else if ( cursor[len-1] == ' ' ) { + flags |= SCAN_INDIC_S; + } + /* opening doc sep */ if ( len >= 3 && strncmp( cursor, "---", 3 ) == 0 ) flags |= SCAN_DOCSEP; This is on Debain, running v5.8.4 and YAML:Syck 0.30
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.4 required=8.0 tests=BAYES_00,MIME_BASE64_NO_NAME,SPF_PASS
In-Reply-To: <rt-3.5.HEAD-2725-1139592281-1292.17574-4-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: pass (x1.develooper.com: domain of autrijus [...] gmail.com designates 64.233.184.199 as permitted sender)
References: <RT-Ticket-17574 [...] rt.cpan.org> <rt-3.5.HEAD-2725-1139592281-1292.17574-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 9097F4D8151 for <cpan-bug+yaml-syck [...] diesel.bestpractical.com>; Sat, 11 Feb 2006 04:05:38 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id DD0014D8150 for <bug-YAML-Syck [...] rt.cpan.org>; Sat, 11 Feb 2006 04:05:30 -0500 (EST)
Received: (qmail 23591 invoked by alias); 11 Feb 2006 09:04:55 -0000
Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.199) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sat, 11 Feb 2006 01:04:24 -0800
Received: by wproxy.gmail.com with SMTP id 71so553849wri for <bug-YAML-Syck [...] rt.cpan.org>; Sat, 11 Feb 2006 01:04:19 -0800 (PST)
Received: by 10.65.230.17 with SMTP id h17mr139054qbr; Sat, 11 Feb 2006 01:04:19 -0800 (PST)
Received: by 10.64.251.17 with HTTP; Sat, 11 Feb 2006 01:04:19 -0800 (PST)
Delivered-To: cpan-bug+yaml-syck [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17574] Problem with strings ending in ':' and ' '
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LNOf4ylVTRqQQHhCk79yFSLPC4n8yodw4VRFpipHK5JURZZup1JY/pxNqh2BebjNh/oiaVMlUhN538qu++t8IbhT0zxB04hCdL82O3tRfehg1G6vdLumph7Y6r+hyGFOjtP8SGHngqsXedSqrsIXAflOptFeMTtC00ZY7j0zdeM=
Return-Path: <autrijus [...] gmail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+yaml-syck [...] diesel.bestpractical.com
Date: Sat, 11 Feb 2006 17:04:19 +0800
Message-Id: <1912f0e20602110104g1fdc25eclb0384c1122de500c [...] mail.gmail.com>
To: bug-YAML-Syck [...] rt.cpan.org
Content-Transfer-Encoding: base64
From: Audrey Tang <autrijus [...] gmail.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-2749-1139649544-1455.17574-0-0 [...] rt.cpan.org>
Content-Length: 542
Download (untitled) / with headers
text/plain 542b
On 2/11/06, Guest via RT <bug-YAML-Syck@rt.cpan.org> wrote: Show quoted text
> Fri Feb 10 12:24:40 2006: Request 17574 was acted upon. > Transaction: Ticket created by guest > Queue: YAML-Syck > Subject: Problem with strings ending in ':' and ' ' > Owner: Nobody > Requestors: aaron@sysdev.oucs.ox.ac.uk > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17574 > > > > YAML:Syck doesn't seem to correctly encode strings that end with either > a ':' or a ' '
0.31 fixes it, but I'll look at chasing CVS later.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.