Re: Converting a Unicode code to related charachter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



there is iconv to do this. you should better check that.



On Sun, Dec 18, 2011 at 11:33 AM, Ali Asghar Toraby Parizy <
aliasghar.toraby@xxxxxxxxx> wrote:

> Hi.
> As I was writing a php code last week, I struggled with a function that was
> supposed to convert Unicode code to a character. At last I wrote this
> function:
>
> function unicodeToChr($param) {
>
>        $a =json_decode('{"t":"'.$param.'"}');
>
>        return $a->t;
> }
>
>
> In this function the $param should be something like '\u0627'. I want to
> know if it's acceptable to use this function? Does exist any better
> solution to do that?
> Thanks.
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux