ID:               34105
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nospamplease at veganismus dot ch
-Status:           Open
+Status:           Feedback
 Bug Type:         Unknown/Other Function
 Operating System: Windows NT 5.2 build 379
 PHP Version:      5.0.4
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:
------------------------------------------------------------------------

[2005-08-12 18:28:06] nospamplease at veganismus dot ch

Description:
------------
i think ƒ (aka ƒ aka ƒ) is converted to a nonapplicable
character (Α) when converting from UTF-8.

This is similar to the bug #32063.

Reproduce code:
---------------
<?
header('Content-Type: text/html; charset=utf8');
$chr = uft8_chr(402);
echo 'UTF-8-Character: '.$chr;
echo ' ('.ord($chr[0]).'/'.ord($chr[1]).')';
echo '<br>Actual result: ';
$str = htmlentities($chr,1,'utf-8');
echo $str;
echo '<br>Actual result (source): ';
echo htmlspecialchars($str);
echo '<br>Expected result: &fnof;<br>Expected result (source):
&amp;fnof;';

function uft8_chr($num){
  if($num<128)return chr($num);
  if($num<2048)return chr(($num>>6)+192).chr(($num&63)+128);
  if($num<65536)return
chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128);
  if($num<2097152)return
chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128)
.chr(($num&63)+128);
  return '';
 }
?>

Expected result:
----------------
"&fnof;" (or "&#402;")

Actual result:
--------------
"&Alpha;"


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


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

Reply via email to