#28348 [NEW]: str_pad counts unicode characters as two
| From: | shy at weblab dot pt | Date: | Mon, 10 May 2004 11:19:50 +0000 |
| Subject: | #28348 [NEW]: str_pad counts unicode characters as two | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-59464@lists.php.net to get a copy of this message | ||
From: shy at weblab dot pt
Operating system:
PHP version: 4.3.4
PHP Bug Type: Output Control
Bug description: str_pad counts unicode characters as two
Description:
------------
In a utf-8 encoded page str_pad counts 8-bit characters
as two.
Reproduce code:
---------------
<?=str_pad('Nação',10,'.'),'Representante';?>
Expected result:
----------------
Nação.....Representante
Actual result:
--------------
Nação...Representante
--
Edit bug report at http://bugs.php.net/?id=28348&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28348&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28348&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28348&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28348&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28348&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28348&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28348&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28348&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28348&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28348&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28348&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28348&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28348&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28348&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28348&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28348&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28348&r=float