Edit report at https://bugs.php.net/bug.php?id=61116&edit=1

 ID:                 61116
 Patch added by:     vr...@php.net
 Reported by:        vr...@php.net
 Summary:            HTML functions use encoding, not charset
 Status:             Open
 Type:               Bug
 Package:            Strings related
 Operating System:   Irrelevant
 PHP Version:        trunk-SVN-2012-02-16 (SVN)
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: php-src
Revision:   1329436461
URL:        
https://bugs.php.net/patch-display.php?bug=61116&patch=php-src&revision=1329436461


Previous Comments:
------------------------------------------------------------------------
[2012-02-16 23:54:14] vr...@php.net

Description:
------------
HTML functions use encoding, not charset.

E.g. ISO-8859-1 is both character set and encoding but UTF-8 is encoding of 
Unicode character set.

There's also missing arg_info in get_html_translation_table().

I've already fixed Manual.


Test script:
---------------
Reflection::export(new ReflectionFunction('htmlspecialchars'));
Reflection::export(new ReflectionFunction('get_html_translation_table'));


Expected result:
----------------
Function [ <internal:standard> function htmlspecialchars ] {

  - Parameters [4] {
    Parameter #0 [ <required> $string ]
    Parameter #1 [ <optional> $quote_style ]
    Parameter #2 [ <optional> $encoding ]
    Parameter #3 [ <optional> $double_encode ]
  }
}

Function [ <internal:standard> function get_html_translation_table ] {

  - Parameters [2] {
    Parameter #0 [ <optional> $table ]
    Parameter #1 [ <optional> $quote_style ]
    Parameter #2 [ <optional> $encoding ]
  }
}



Actual result:
--------------
Function [ <internal:standard> function htmlspecialchars ] {

  - Parameters [4] {
    Parameter #0 [ <required> $string ]
    Parameter #1 [ <optional> $quote_style ]
    Parameter #2 [ <optional> $charset ]
    Parameter #3 [ <optional> $double_encode ]
  }
}

Function [ <internal:standard> function get_html_translation_table ] {

  - Parameters [2] {
    Parameter #0 [ <optional> $table ]
    Parameter #1 [ <optional> $quote_style ]
  }
}




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61116&edit=1

Reply via email to