Skip Menu |
 

This queue is for tickets about the BibTeX-Parser CPAN distribution.

Report information
The Basics
Id: 43014
Status: resolved
Priority: 0/
Queue: BibTeX-Parser

People
Owner: Nobody in particular
Requestors: chong [...] seas.harvard.edu
Cc:
AdminCc:

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



Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 6A3A64D8040 for <bug-BibTeX-Parser [...] rt.cpan.org>; Tue, 3 Feb 2009 22:08:25 -0500 (EST)
Received: (qmail 15828 invoked by uid 103); 4 Feb 2009 03:08:24 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 4 Feb 2009 03:08:24 -0000
Received: from smtp-outbound.seas.harvard.edu (HELO smtp-outbound.seas.harvard.edu) (140.247.51.171) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 19:08:21 -0800
Received: from braeburn.local ([134.173.66.54]) (authenticated bits=0) by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with ESMTP id n1437w91009161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <bug-BibTeX-Parser [...] rt.cpan.org>; Tue, 3 Feb 2009 22:07:59 -0500
Delivered-To: cpan-bug+BibTeX-Parser [...] diesel.bestpractical.com
Subject: Author names with non-word characters
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.0
X-Spam-Status: No, hits=-4.0 required=8.0 tests=RCVD_IN_DNSWL_MED
Return-Path: <chong [...] seas.harvard.edu>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-BibTeX-Parser [...] rt.cpan.org
Date: Tue, 03 Feb 2009 19:07:57 -0800
X-Spam-Level: *
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <4989068D.3000901 [...] seas.harvard.edu>
To: bug-BibTeX-Parser [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Stephen Chong <chong [...] seas.harvard.edu>
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 284
Download (untitled) / with headers
text/plain 284b
Hi, I think there is a bug in the pattern used to match author names, on line 141 of Author.pm. The expression \b([\w-]+) does not match surnames that contain, for example, an apostrophe, such as "O'Malley". Thanks for writing/maintaining this, it is very useful! Cheers, Steve.
MIME-Version: 1.0
In-Reply-To: <4989068D.3000901 [...] seas.harvard.edu>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <4989068D.3000901 [...] seas.harvard.edu>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-25318-1247667579-672.43014-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 811
Download (untitled) / with headers
text/plain 811b
On Tue Feb 03 22:08:39 2009, chong@seas.harvard.edu wrote: Show quoted text
> Hi, > I think there is a bug in the pattern used to match author names, on > line 141 of Author.pm. The expression \b([\w-]+) does not match surnames > that contain, for example, an apostrophe, such as "O'Malley". > > Thanks for writing/maintaining this, it is very useful!
Hi Gerhard, hi Steve, I'm also suffering from a related problem (but probably not exactly the same as Steve). The following BibTeX entry sends the parser into an endless loop: @article{testkey, year = {2008}, author = {A. Bar and L.M. M\"uller}, journal = {journal}, volume = {1}, number = {1}, pages = {1}, } I'd really, really appreciate to get this issue fixed! I'd hate having to write my own parser :( Thanks for writing the parser! Cheers, Steffen
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-25318-1247667579-672.43014-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <4989068D.3000901 [...] seas.harvard.edu> <rt-3.6.HEAD-25318-1247667579-672.43014-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-25318-1247838676-509.43014-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 439
Download (untitled) / with headers
text/plain 439b
Hi Gerhard, On Wed Jul 15 10:19:39 2009, SMUELLER wrote: Show quoted text
> @article{testkey, > year = {2008}, > author = {A. Bar and L.M. M\"uller}, > journal = {journal}, > volume = {1}, > number = {1}, > pages = {1}, > }
please find two files in the attachments: t/bibs/10-funnyname.bib and t/10-funnyname.t which test the related bug. The infinite loop only occurs when the ->author or ->editor methods are called. Best regards, Steffen
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-25318-1247838676-509.43014-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
References: <4989068D.3000901 [...] seas.harvard.edu> <rt-3.6.HEAD-25318-1247667579-672.43014-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-25318-1247838676-509.43014-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1247838763-25318-943"
Message-ID: <rt-3.6.HEAD-25318-1247838763-1726.43014-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 118
Download (untitled) / with headers
text/plain 118b
Oddly, the attachment didn't work the first time. Trying again with only one each time. This should be the test file.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1247838763-25318-942"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/x-troff; name="10-funnyname.t"
Content-Disposition: inline; filename="10-funnyname.t"
Content-Transfer-Encoding: base64
Content-Length: 1055
Download 10-funnyname.t
text/x-perl 1k
#!perl -T use Test::More tests => 11; use IO::File; use BibTeX::Parser; my $fh = IO::File->new('t/bibs/10-funnyname.bib'); my $parser = BibTeX::Parser->new($fh); #my @result = BibTeX::Parser->_parse($fh); my $entry = $parser->next; is_deeply( $entry, { _type => 'ARTICLE', _key => 'testkey', author => "A. Bar and L.M. M\"uller", title => 'foo', journal => 'journal', volume => 1, number => 1, pages => 1, year => 2008, _parse_ok => 1 }, "parse \@ARTICLE" ); my @authors = $entry->author; pass("->author didn't loop forever"); ok(@authors == 2, "Two authors"); is($authors[0]->first, 'A.', "A1 first name"); is($authors[0]->last, 'Bar', "A1 last name"); ok(!$authors[0]->von, "A1 no 'von'"); ok(!$authors[0]->jr, "A1 no 'jr'"); is($authors[1]->first, 'L.M.', "A2 first name"); is($authors[1]->last, 'M"uller', "A2 last name"); ok(!$authors[1]->von, "A2 no 'von'"); ok(!$authors[1]->jr, "A2 no 'jr'");
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-25318-1247838763-1726.43014-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
References: <4989068D.3000901 [...] seas.harvard.edu> <rt-3.6.HEAD-25318-1247667579-672.43014-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-25318-1247838676-509.43014-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-25318-1247838763-1726.43014-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1247838788-25318-949"
Message-ID: <rt-3.6.HEAD-25318-1247838788-251.43014-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 36
This should be the test BIB file.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1247838787-25318-948"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/x-bibtex; name="10-funnyname.bib"
Content-Disposition: inline; filename="10-funnyname.bib"
Content-Transfer-Encoding: binary
Content-Length: 165
Download 10-funnyname.bib
text/x-bibtex 165b
@article{testkey, year = {2008}, title = "foo", author = {A. Bar and L.M. M\"uller}, journal = {journal}, volume = {1}, number = {1}, pages = {1}, }
MIME-Version: 1.0
In-Reply-To: <4989068D.3000901 [...] seas.harvard.edu>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <4989068D.3000901 [...] seas.harvard.edu>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-14916-1248629808-1402.43014-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 159
Download (untitled) / with headers
text/plain 159b
Hi, I fixed both problems in version 0.3 which should be on CPAN now. If you find any additional names that cause problems I would be glad to hear about them.


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.