Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>i assume you wnat to convert بهروز to \u0628\u0647\u0631\u0648\u0632 take a look at <a href="http://hsivonen.iki.fi/php-utf8/" rel="nofollow">http://hsivonen.iki.fi/php-utf8/</a> all you have to do after calling unicodeToUtf8('بهروز') is to convert integers you got in array to hex &amp; make sure they have 4digigts &amp; prefix em with \u &amp; you're done. also you can get same using json_encode</p> <pre> json_encode('بهروز') // returns "\u0628\u0647\u0631\u0648\u0632" </pre> <p><b>EDIT:</b></p> <p>seems you want to get character codes of بب which first one differs from second one, all you have to do is applying bidi algorithm on your text using <a href="http://ir.php.net/manual/en/function.fribidi-log2vis.php" rel="nofollow">fribidi_log2vis</a> then getting character code by one of ways i said before.</p> <p>here's example:</p> <pre> $string = 'بب'; // \u0628\u0628 $bidiString = fribidi_log2vis($string, FRIBIDI_LTR, FRIBIDI_CHARSET_UTF8); json_encode($bidiString); // \ufe90\ufe91 </pre> <p><b>EDIT:</b></p> <p>i just remembered that tcpdf has bidi algorithm which implemented using pure php so if you can not get fribidi extension of php to work, you can use tcpdf (utf8Bidi by default is protected so you need to make it public)</p> <pre> require_once('utf8.inc'); // http://hsivonen.iki.fi/php-utf8/ require_once('tcpdf.php'); // http://www.tcpdf.org/ $t = new TCPDF(); $text = 'بب'; $t->utf8Bidi(utf8ToUnicode($text)); // will return an array like array(0 => 65168, 1 => 65169) </pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload