Bug #51321 [Opn->Bgs]: shows same ascii for two diferent french characters
| From: | johannes@php.net | Date: | Sun, 21 Mar 2010 19:04:15 +0000 |
| Subject: | Bug #51321 [Opn->Bgs]: shows same ascii for two diferent french characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-148812@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51321&edit=1
ID: 51321
Updated by: johannes@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