bugGNU Wget - Bugs: bug #20481, Progress bar needs to calculate...

 
 

bug #20481: Progress bar needs to calculate spaces using num-chars, not num-bytes

Submitted by:  None
Submitted on:  Sat 14 Jul 2007 06:37:50 PM UTC  
 
Category: User InterfaceSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed In Repository
Privacy: PublicAssigned to: Micah Cowan <micahcowan>
Originator Name: hajmaOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.10.2
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: 1.11.1Planned Release: 1.11.1
Regression: NoneWork Required: 1 - Days
Patch Included: No

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 27 Jan 2008 04:21:29 AM UTC, comment #2:

Should account for multi-column characters, while we're at it.

Micah Cowan <micahcowan>In charge of this item.
Fri 03 Aug 2007 12:30:58 AM UTC, comment #1:

The problem, as described, has been "fixed" in the trunk, in that we now attempt to write extra spaces to the end of the line. This is still broken, and is a hack workaround to the real issue: that we're counting bytes, rather than characters (strlen()).

cs_CZ.UTF-8 uses the "non-breaking space" as the number-group separator, which in UTF-8 is represented in two bytes (0xc2 0xa0). When we shift from a display of 6 digits to 7 digits, adding an extra group separator, wget believes we have just added 3 characters, when in fact we've added only two (but three bytes); this causes the "ETA" string to slip to the left, which in 1.10 resulted in the final digit not being overwritten.

Instead of trying to write extra spaces to the end, we should count our characters properly. The standard library provides the tools, we just need to use 'em.

Micah Cowan <micahcowan>In charge of this item.
Sat 14 Jul 2007 06:37:50 PM UTC, original submission:

the ETA will contain an additional digit for seconds after the length of already downloaded file skips from 999 999 to 1 000 000
The digit apparently comes from previous ETA which does not handle well the shifting.
Using cs_CZ.UTF-8 locale. It does not happen with the LC_ALL=C locale.

see this "screenshot":

[www-data@localhost man-pages]$ wget http://ftp.mj2.org/pub/linux/docs/manpages/Archive/man-pages-2.03.tar.bz2
--20:22:43-- http://ftp.mj2.org/pub/linux/docs/manpages/Archive/man-pages-2.03.tar.bz2
=> `man-pages-2.03.tar.bz2'
Resolving ftp.mj2.org... 64.240.156.196
Connecting to ftp.mj2.org|64.240.156.196|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 1 676 415 (1.6M) [application/x-bzip2]

100%[====================================>] 1 676 415 57.88K/s ETA 00:001

20:23:18 (47.60 KB/s) - `man-pages-2.03.tar.bz2' saved [1676415/1676415]

[www-data@localhost man-pages]$

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Updated the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 03 Feb 2008 09:52:13 AM UTCmicahcowanStatusIn Progress=>Fixed In Repository
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.11.1
    Sun 03 Feb 2008 08:51:11 AM UTCmicahcowanAssigned toyurimxpxman=>micahcowan
      Planned Release1.15=>1.11.1
    Sun 27 Jan 2008 04:21:29 AM UTCmicahcowanPlanned Release1.12=>1.15
    Fri 03 Aug 2007 12:36:35 AM UTCmicahcowanSummaryETA display problem after downloaded size changes order - locale dependant=>Progress bar needs to calculate spaces using num-chars, not num-bytes
    Thu 02 Aug 2007 10:35:32 PM UTCmicahcowanStatusNone=>In Progress
      Assigned toNone=>yurimxpxman
    Fri 20 Jul 2007 11:49:37 PM UTCmicahcowanWork RequiredNone=>1 - Days
    Fri 20 Jul 2007 07:06:11 AM UTCmicahcowanPlanned ReleaseNone=>1.12

    Back to the top


    Powered by Savane 3.1-cleanup1