Reputation: 65
I Want To Get Ascii Code from Persian characters.
My Code:
<?php
header ('Content-Type: text/html; charset=UTF-8');
$Char = "س"; // This is a Persian Character
echo ord($Char); // Output: 216
echo ord(utf8_encode($Char)); // Output: 195
// The Real Code Of This Character: 1587
?>
Upvotes: 2
Views: 858