Edit report at http://bugs.php.net/bug.php?id=51321&edit=1
ID: 51321 Updated by: johan...@php.net Reported by: sharad dot tale at gmail dot com Summary: shows same ascii for two diferent french characters -Status: Open +Status: Bogus Type: Bug Package: *General Issues Operating System: windows xp PHP Version: 5.3.2 New Comment: You're script is encoded using Utf-8 therefore à and à are multibyte characters. ord() gives you the value of the first byte. Previous Comments: ------------------------------------------------------------------------ [2010-03-18 12:14:11] sharad dot tale at gmail dot com Expected result: ---------------- Ascii for char1 is = 224 Ascii for char2 is = 195 Actual result: -------------- Ascii for char1 is = 195 Ascii for char2 is = 195 ------------------------------------------------------------------------ [2010-03-18 12:12:11] sharad dot tale at gmail dot com Description: ------------ shows same ascii for two different french characters Test script: --------------- <?php $char1="à "; $chart2="Ã"; echo "Ascii for char1 is =".ord($char1); echo "<br/>"; echo "Ascii for char2 is =".ord($char2); ?> Expected result: ---------------- Ascii for char1 is = 224 Ascii for char1 is = 195 Actual result: -------------- Ascii for char1 is = 195 Ascii for char1 is = 195 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51321&edit=1