Bug #72752 [NEW]: mb_convert_encoding fails to convert chars from HTML-ENTITIES to some encodings
From: contact at amb dot tf
Operating system: Arch Linux
PHP version: 7.0.9
Package: mbstring related
Bug Type: Bug
Bug description:mb_convert_encoding fails to convert chars from HTML-ENTITIES to some encodings
Description:
------------
mb_convert_encoding fails to convert HTML-ENTITIES encoded chars to the
following encodings:
* BASE64
* Quoted-Printable
* 7bit
Test script:
---------------
<?php
foreach ([
'BASE64',
'UUENCODE',
'HTML-ENTITIES',
'Quoted-Printable',
'7bit',
'8bit',
] as $encoding) {
echo "$encoding: ", mb_convert_encoding('a', $encoding,
'HTML-ENTITIES'), PHP_EOL;
}
Expected result:
----------------
BASE64: YQ==
UUENCODE: a
HTML-ENTITIES: a
Quoted-Printable: a
7bit: a
8bit: a
Actual result:
--------------
BASE64: JiN4NjE7
UUENCODE: a
HTML-ENTITIES: a
Quoted-Printable: a
7bit: a
8bit: a
--
Edit bug report at https://bugs.php.net/bug.php?id=72752&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72752&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72752&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72752&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72752&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72752&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72752&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72752&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72752&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72752&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72752&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72752&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72752&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72752&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72752&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72752&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72752&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72752&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72752&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72752&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72752&r=mysqlcfg
Thread (2 messages)
- contact at amb dot tf