Skip Menu |
 

This queue is for tickets about the Number-Bytes-Human CPAN distribution.

Report information
The Basics
Id: 72825
Status: resolved
Priority: 0/
Queue: Number-Bytes-Human

People
Owner: Nobody in particular
Requestors: mamandel [...] ldc.upenn.edu
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.07
Fixed in: 0.09



Subject: — instead of - in perldoc
Date: Tue, 29 Nov 2011 17:43:04 -0500
To: bug-Number-Bytes-Human [...] rt.cpan.org
From: Mark Mandel <mamandel [...] ldc.upenn.edu>
Download (untitled) / with headers
text/plain 3.4k
[This is a copy of email also sent to "Adriano R. Ferreira" <ferreira@cpan.org> and to bug−Number−Bytes−Human@rt.cpan.org. The latter bounced, for the reason described below: those aren't hyphens but something else.] ===================== I installed Number-Bytes-Human-0.07 on my iMac, under Mac OS X v10.6.8. I copied the example script from the perldoc Synopsis and added a subroutine to show the results. Here it is, with the output: ------------ iMac:tmp 9 $ cat nbh.pl sub show { printf("%s\n", $_[0]); } use Number::Bytes::Human qw(format_bytes); show $size = format_bytes(0); # '0' show $size = format_bytes(2*1024); # '2.0K' show $size = format_bytes(1_234_890, bs => 1000); # '1.3M' show $size = format_bytes(1E9, bs => 1000); # '1.0G' # the OO way $human = Number::Bytes::Human−>new(bs => 1000, si => 1); show $size = $human−>format(1E7); # '10MB' $human−>set_options(zero => '−'); show $size = $human−>format(0); # '−' iMac:tmp 10 $ perl nbh.pl Unrecognized character \xE2 in column 39 at nbh.pl line 12. iMac:tmp 11 $ perl nbh.pl Unrecognized character \xE2 in column 29 at nbh.pl line 13. iMac:tmp 12 $ perl nbh.pl Unrecognized character \xE2 in column 16 at nbh.pl line 14. iMac:tmp 13 $ perl nbh.pl Unrecognized character \xE2 in column 29 at nbh.pl line 15. iMac:tmp 14 $ perl nbh.pl 0 2.0K 1.3M 1.0G 10MB − iMac:tmp 15 $ ------------ Those are the first characters in the small arrow notation, '−'. For whatever reason, that's not a minus sign \x2D. \xE2 is small a with circumflex, â, which that certainly is not. There are a couple of other odd characters in there -- \x88 and \x92. When I edited the file in Emacs and manually replaced each "Unrecognized character \xE2" with a proper minus sign/hyphen, \x2D, I got the expected result. The CPAN page you gave in the Perldoc, https://rt.cpan.org/Public/Dist/Display.html?Name=Number−Bytes−Human, came out in one of my tries as https://rt.cpan.org/Public/Dist/Display.html?Name=Number%E2%88%92Bytes%E2%88%92Human and gives the following result: ------------ Unable to find distribution The distribution you specified, Number−Bytes−Human, could not be found. Please use the search or new ticket form at the top of the page to find the distribution's bug report page. ------------ I suspect that's why it tells you you can't log in. Two problems here: 1. You're delimiting the parts of the name of the module with what look like hyphens \x2D, but the URL reveals that you're actually using the same wrong string there as you are in the synopsis, \xE2\x88\x92. 2. CPAN doesn't use hyphens anyway, it uses double colons. I tried https://rt.cpan.org/Public/Dist/Display.html?Name=Number::Bytes::Human and I got ---------- Maintainer(s) FERREIRA Bugs ---------- The mistaken character produced by that byte triplet looks like an em dash, \x2014. I don't know if that's what it is or how it got there, but the problem is obvious and so is the solution. 1. Don't type your example code in a word processor. Word processors do to words (and especially code) what food processors do to food. 2. Use the right delimiters. I hope that now I will be able to use your module for my work as I intended to. Sincerely, -- Mark A. Mandel, Research Administrator Linguistic Data Consortium University of Pennsylvania 3600 Market Street, Suite 810, rm.125 Philadelphia, PA, 19104-2653, USA ph: 215-573-5615 fax: 215-573-2175
Download (untitled) / with headers
text/plain 932b
Hi Mark, Am Di 29. Nov 2011, 17:43:22, mamandel@ldc.upenn.edu schrieb: Show quoted text
> Those are the first characters in the small arrow notation, '−'. For > whatever reason, that's not a minus sign \x2D. \xE2 is small a with > circumflex, â, which that certainly is not. There are a couple of > other odd characters in there -- \x88 and \x92. When I edited the > file in Emacs and manually replaced each "Unrecognized character > \xE2" with a proper minus sign/hyphen, \x2D, I got the expected > result. > > The CPAN page you gave in the Perldoc, > https://rt.cpan.org/Public/Dist/Display.html?Name=Number−Bytes−Human, > came out in one of my tries as > https://rt.cpan.org/Public/Dist/Display.html?
Name=Number%E2%88%92Bytes%E2%88%92Human Show quoted text
> and gives the following result:
I cannot reproduce the issue with the current webpage. If the error persists please give me your exact configuration. Best regards -- Dago
Subject: Re: [rt.cpan.org #72825] — instead of - in perldoc
Date: Wed, 3 Apr 2013 12:07:46 -0400
To: bug-Number-Bytes-Human [...] rt.cpan.org
From: "Mark A. Mandel" <mamandel [...] ldc.upenn.edu>
Download (untitled) / with headers
text/plain 1.3k
Show quoted text
> I cannot reproduce the issue with the current webpage.
Well, it's been 16 months since I filed the report, and in the meantime the module has gone from version 0.7 to 0.9. I just checked the module's current source code (http://cpansearch.perl.org/src/DAGOBERT/Number-Bytes-Human-0.09/Human.pm), and it's all ASCII now. Thanks for trying. -- Mark On 13.03.01, at 08:37, Dagobert Michelsen via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72825 > > > Hi Mark, > > Am Di 29. Nov 2011, 17:43:22, mamandel@ldc.upenn.edu schrieb:
>> Those are the first characters in the small arrow notation, '−'. For >> whatever reason, that's not a minus sign \x2D. \xE2 is small a with >> circumflex, â, which that certainly is not. There are a couple of >> other odd characters in there -- \x88 and \x92. When I edited the >> file in Emacs and manually replaced each "Unrecognized character >> \xE2" with a proper minus sign/hyphen, \x2D, I got the expected >> result. >> >> The CPAN page you gave in the Perldoc, >> https://rt.cpan.org/Public/Dist/Display.html?Name=Number−Bytes−Human, >> came out in one of my tries as >> https://rt.cpan.org/Public/Dist/Display.html?
> Name=Number%E2%88%92Bytes%E2%88%92Human
>> and gives the following result:
> > I cannot reproduce the issue with the current webpage. If the error persists please give me your > exact configuration. > > > Best regards -- Dago
Ok, closing.


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.