<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Console_Table</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/21072" />
      <rdf:li rdf:resource="http://pear.php.net/bug/21070" />
      <rdf:li rdf:resource="http://pear.php.net/bug/11326" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/21072">
      <title>Console_Table: Feature/Change Request 21072 [Open] Allow calculateTotalsFor() to parse formatted numbers</title>
      <link>http://pear.php.net/bugs/21072</link>
      <content:encoded><![CDATA[<pre>Console_Table Feature/Change Request
Reported by bmcdanel
2016-05-31T19:11:57+00:00
PHP: Irrelevant OS: irrelevant Package Version: 1.3.0

Description:
------------
When a filter is applied it will be processed before 
calculateTotalsFor() is processed.  This can be a good thing as 
numbers can be altered during 
the format stage.  If calculateTotalsFor() was processed first 
then 2+2=5 could happen for large values of 2 and a formatting 
stripping the 
fractional part (eg float to int).

A simple method that requires you to specify or use a default 
can be found at https://gist.github.com/msng/1504235
calculateTotalsFor() could take additional optional parameters 
that would specify the additional data or it could be set 
somewhere else.

Below I try to explain the challenge to unformatting a number 
without knowing what the integral separator and decimal 
separator are.  I think 
that it will largely push towards having the user just declare it 
based on the data they presumably know the format for.


There are 3 main categories for numbers.  Sign, integral part, 
decimal part.  Some examples of different formatting styles can 
be found at 
https://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use

SIGN
This can be a variety of things.
+123  = 123
123    = 123
-123   = -123
123-   = -123
(123)  = -123
%r123 = -123 (color formatting, red)

FRACTIONAL PART
This is often one of two characters a comma or a full stop 
(period).  There is never more than one fractional separator 
however with an integer it 
may not be present.

INTEGRAL PART
This can be one of several characters. a comma, space, full 
stop, ' (in a couple styles).  There may be more I am unaware 
of.  It may or may not  
be present, and groupings may be 2, 3 or 4 digits.  It will 
always be left of the fractional separator except when it is not 
(eg right to left 
languages like those in the Middle East).  

You cannot programmatically parse all numbers.
1.000 could be 1000 or it could be 1 unless you know the 
fractional separator and the integral separator ahead of time.  
You cannot rely on the system locale as it may be serving data 
intended for someone using a different locale 

SCIENTIFIC NOTATION and other numerical schemes
outside the scope for this, although it could be added easily 
enough.




My patch incorporates the trivial fix for 
https://pear.php.net/bugs/bug.php?id=21070</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Table Feature/Change Request
Reported by bmcdanel
2016-05-31T19:11:57+00:00
PHP: Irrelevant OS: irrelevant Package Version: 1.3.0

Description:
------------
When a filter is applied it will be processed before 
calculateTotalsFor() is processed.  This can be a good thing as 
numbers can be altered during 
the format stage.  If calculateTotalsFor() was processed first 
then 2+2=5 could happen for large values of 2 and a formatting 
stripping the 
fractional part (eg float to int).

A simple method that requires you to specify or use a default 
can be found at https://gist.github.com/msng/1504235
calculateTotalsFor() could take additional optional parameters 
that would specify the additional data or it could be set 
somewhere else.

Below I try to explain the challenge to unformatting a number 
without knowing what the integral separator and decimal 
separator are.  I think 
that it will largely push towards having the user just declare it 
based on the data they presumably know the format for.


There are 3 main categories for numbers.  Sign, integral part, 
decimal part.  Some examples of different formatting styles can 
be found at 
https://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use

SIGN
This can be a variety of things.
+123  = 123
123    = 123
-123   = -123
123-   = -123
(123)  = -123
%r123 = -123 (color formatting, red)

FRACTIONAL PART
This is often one of two characters a comma or a full stop 
(period).  There is never more than one fractional separator 
however with an integer it 
may not be present.

INTEGRAL PART
This can be one of several characters. a comma, space, full 
stop, ' (in a couple styles).  There may be more I am unaware 
of.  It may or may not  
be present, and groupings may be 2, 3 or 4 digits.  It will 
always be left of the fractional separator except when it is not 
(eg right to left 
languages like those in the Middle East).  

You cannot programmatically parse all numbers.
1.000 could be 1000 or it could be 1 unless you know the 
fractional separator and the integral separator ahead of time.  
You cannot rely on the system locale as it may be serving data 
intended for someone using a different locale 

SCIENTIFIC NOTATION and other numerical schemes
outside the scope for this, although it could be added easily 
enough.




My patch incorporates the trivial fix for 
https://pear.php.net/bugs/bug.php?id=21070</pre>]]></description>
      <dc:date>2016-05-31T19:11:57+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; 0xdecafbad &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Console_Table Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/21070">
      <title>Console_Table: Bug 21070 [Open] Cannot calculateTotalsFor() with colorized text</title>
      <link>http://pear.php.net/bugs/21070</link>
      <content:encoded><![CDATA[<pre>Console_Table Bug
Reported by bmcdanel
2016-05-31T12:56:34+00:00
PHP: 5.5.18 OS: ubuntu Package Version: 1.3.0

Description:
------------
Colorized text (Console_Color2) adds escape characters.
calculateTotalsFor() does not strip this

This would work if calculateTotalsFor() ran before the filters but 
that would likely cause problems 
for several use cases where data formatting is required (eg 
2+2=5 for large values of 2).

I defined my table with &quot;ansi color&quot; = true.  However that 
function does not use it.  To that end I 
altered it:

Starting about line 504 in Table.php
                foreach ($this-&gt;_calculateTotals as $columnID) {
                        if ($this-&gt;_ansiColor) {
                               $totals[$columnID] += $this-&gt;_ansiColor-
&gt;strip($row[$columnID]);
                        } else {
                               $totals[$columnID] += $row[$columnID];
        		}
                }


Works for me.  Should work for everyone.

Expected result:
----------------
for it to work

Actual result:
--------------
didnt work</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Table Bug
Reported by bmcdanel
2016-05-31T12:56:34+00:00
PHP: 5.5.18 OS: ubuntu Package Version: 1.3.0

Description:
------------
Colorized text (Console_Color2) adds escape characters.
calculateTotalsFor() does not strip this

This would work if calculateTotalsFor() ran before the filters but 
that would likely cause problems 
for several use cases where data formatting is required (eg 
2+2=5 for large values of 2).

I defined my table with &quot;ansi color&quot; = true.  However that 
function does not use it.  To that end I 
altered it:

Starting about line 504 in Table.php
                foreach ($this-&gt;_calculateTotals as $columnID) {
                        if ($this-&gt;_ansiColor) {
                               $totals[$columnID] += $this-&gt;_ansiColor-
&gt;strip($row[$columnID]);
                        } else {
                               $totals[$columnID] += $row[$columnID];
        		}
                }


Works for me.  Should work for everyone.

Expected result:
----------------
for it to work

Actual result:
--------------
didnt work</pre>]]></description>
      <dc:date>2016-05-31T12:56:34+00:00</dc:date>
      <dc:creator>pear &amp;#x61;&amp;#116; 0xdecafbad &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Console_Table Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/11326">
      <title>Console_Table: Feature/Change Request 11326 [Open] col and rowspan</title>
      <link>http://pear.php.net/bugs/11326</link>
      <content:encoded><![CDATA[<pre>Console_Table Feature/Change Request
Reported by cipri
2007-06-15T09:13:39+00:00
PHP: 4.4.5 OS: Irrelevant Package Version: 1.0.7

Description:
------------
It would be nice if we could specify col- and rowspans, just as you could with HTML Tables.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Table Feature/Change Request
Reported by cipri
2007-06-15T09:13:39+00:00
PHP: 4.4.5 OS: Irrelevant Package Version: 1.0.7

Description:
------------
It would be nice if we could specify col- and rowspans, just as you could with HTML Tables.</pre>]]></description>
      <dc:date>2007-06-15T09:13:39+00:00</dc:date>
      <dc:creator>cipri &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Console_Table Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
