Skip Menu |

This queue is for tickets about the Audio-TagLib CPAN distribution.

Report information
The Basics
Id: 85621
Status: open
Priority: 0/
Queue: Audio-TagLib

People
Owner: GLEACH [...] cpan.org
Requestors: sisyphus [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.63
Fixed in: 1.64



Subject: Fails to pass all tests with perl-5.18
No problems with earlier perls (going back to 5.8.8), but with 5.18.0 I get: t/TagLib_String.t ................................ 5/40 # Failed test at t/Tag Lib_String.t line 27. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf8) failed # Failed test at t/TagLib_String.t line 29. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf8) failed # Failed test at t/TagLib_String.t line 31. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf8, "UTF8") failed # Failed test at t/TagLib_String.t line 34. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf16be, "UTF16BE") failed # Failed test at t/TagLib_String.t line 37. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf16le, "UTF16LE") failed # Failed test at t/TagLib_String.t line 40. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method new(utf16, "UTF16") failed # Failed test at t/TagLib_String.t line 42. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method toCString(O failed # Failed test at t/TagLib_String.t line 51. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜä' # method substr(position, n) failed # Failed test at t/TagLib_String.t line 55. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ä├ª┬ê┬æ├º┬Ü┬ä' # expected: 'µêæþÜäµêæþÜä' # method append(string) failed # Failed test at t/TagLib_String.t line 63. # got: 2 # expected: 6 # method size() failed # Failed test at t/TagLib_String.t line 107. Wide character in print at C:/_64/perl518_470/lib/Test/Builder.pm line 1759. # got: '├ª┬ê┬æ├º┬Ü┬ätest' # expected: 'µêæþÜätest' # method _append(string) failed # Looks like you failed 11 tests of 40. The other tests all pass. This is a 64-bit build on Win32. I also have a 32-bit build (64int) of 5.18.0, which fails in the same way. Cheers, Rob
Hi SISYPHUS. Long time. As I have neither Windoze nor Perl 5.18, I'm somewhat at a loss as what to do here. Could you update the report with your taglib version? It would also be helpful if you could attempt to verify that the problem (a) with taglib outside of perl and (b) with perl outside of audio-taglib. Thanks.
On Tue May 28 17:07:25 2013, GLEACH wrote: Show quoted text
> Hi SISYPHUS. Long time. > > As I have neither Windoze nor Perl 5.18, I'm somewhat at a loss as > what to do here. Could you update the report with your taglib > version?
I have taglib-1.7.2. Show quoted text
> It would also be helpful if you could attempt to verify > that the problem (a) with taglib outside of perl and (b) with perl > outside of audio-taglib. Thanks.
There's no problem building Audio-TagLib-1.63 on perls 5.8.8, 5.8.9, 5.10.0, 5.12.0, 5.14.0 and 5.16.0. It's just 5.18.0 that produces the test failures - and 5.18.0 is running the same version (0.98) of Test::Builder as the earlier perls. I'm therefore thinking that it's probably *not* a windows-specific problem, and that it probably *is* specific to 5.18.0. It may, of course, be a Test::Builder bug (since that's the module that's throwing the "wide character" warning) but I think it's just reporting what it's in fact seeing. It's a pity you don't have 5.18 yet. I'll see if I can find the cause of the diverging behaviour ... Cheers, Rob
Subject: [rt.cpan.org #85621] Fails to pass all tests with perl-5.18
Date: Thu, 20 Jun 2013 16:34:54 -0700 (PDT)
To: "bug-Audio-TagLib [...] rt.cpan.org" <bug-Audio-TagLib [...] rt.cpan.org>
From: Festus Hagen <festushagen2002 [...] yahoo.com>
The issue is introduced in Perl v5.17.5 and is because of changes made to sv_len_utf8(...) sv_len_utf8(...) is used in two Audio::TagLib functions, they are in xs/tstring.xs:  TagLib::String::to8Bit(unicode = false)   TagLib::String::toCString(unicode = false) The code at fault ...     if(sv_len_utf8(RETVAL) != sv_len(RETVAL)) -Enjoy fh : )_~
On Thu Jun 20 19:35:06 2013, festushagen2002@yahoo.com wrote: Show quoted text
> The code at fault ... >     if(sv_len_utf8(RETVAL) != sv_len(RETVAL))
Best I can come up with is this patch to xs/tstring.xs: --- tstring.xs_orig 2013-08-29 13:16:49 +1000 +++ tstring.xs 2013-08-29 16:51:16 +1000 @@ -202,7 +202,7 @@ std::string string = THIS->to8Bit(unicode); CODE: RETVAL = newSVpv(string.c_str(), 0); - if(sv_len_utf8(RETVAL) != sv_len(RETVAL)) + if(!is_ascii_string((const U8 *)string.c_str(), 0)) SvUTF8_on(RETVAL); OUTPUT: RETVAL @@ -214,7 +214,7 @@ const char *c_str = THIS->toCString(unicode); CODE: RETVAL = newSVpv(c_str, 0); - if(sv_len_utf8(RETVAL) != sv_len(RETVAL)) + if(!is_ascii_string((const U8 *)c_str,0)) SvUTF8_on(RETVAL); OUTPUT: RETVAL I don't know how well that matches the intention of the original code, but all tests then pass on 5.18.0 (and still pass for all perls back to 5.12.0). Unfortunately, it won't compile on 5.10.0 and earlier, where is_ascii_string() is apparently unknown. (I didn't test any other 5.10.x builds.) Cheers, Rob