I want create register page and for this i write php codes. but when show result in json, not show UTF-8 characters!  my code:  &lt;?php  require_once 'DBOperations.php';  class Functions{  private $db;  public function __construct() {        $this -&gt; db = new DBOperations();  }  public function registerUser($name, $email, $password) {     $db = $this -&gt; db;     if (!empty($name) &amp;&amp; !empty($email) &amp;&amp; !empty($password)) {        if ($db -&gt; checkUserExist($email)) {           $response["result"] = "failure";          $response["message"] = "اين ايميل قبلا ثبت شده است";          return json_encode($response);        } else {           $result = $db -&gt; insertData($name, $email, $password);           if ($result) {                $response["result"] = "success";             $response["message"] = "تبريک، در کلوني عضو شدي";             return json_encode($response);           } else {              $response["result"] = "failure";             $response["message"] = "ثبت نام با خطا روبرو شده است";             return json_encode($response);           }       }    } else {        return $this -&gt; getMsgParamNotEmpty();     } }  public function loginUser($email, $password) {    $db = $this -&gt; db;    if (!empty($email) &amp;&amp; !empty($password)) {      if ($db -&gt; checkUserExist($email)) {         $result =  $db -&gt; checkLogin($email, $password);         if(!$result) {          $response["result"] = "failure";         $response["message"] = "ايميل يا کلمه عبور اشتباه است";         return json_encode($response);         } else {          $response["result"] = "success";         $response["message"] = "با موفقيت وارد شديد";         $response["user"] = $result;         return json_encode($response);         }     } else {        $response["result"] = "failure";       $response["message"] = "خطا در اطلاعات وارد شده";       return json_encode($response);      }   } else {        return $this -&gt; getMsgParamNotEmpty();     } }  public function changePassword($email, $old_password, $new_password) {    $db = $this -&gt; db;    if (!empty($email) &amp;&amp; !empty($old_password) &amp;&amp; !empty($new_password)) {      if(!$db -&gt; checkLogin($email, $old_password)){        $response["result"] = "failure";       $response["message"] = "کلمه عبور قبلي نادرست است";       return json_encode($response);      } else {      $result = $db -&gt; changePassword($email, $new_password);        if($result) {          $response["result"] = "success";         $response["message"] = "کلمه عبور با موفقيت تغيير يافت";         return json_encode($response);        } else {          $response["result"] = "failure";         $response["message"] = 'خطا در تغيير کلمه عبور';         return json_encode($response);        }     }   } else {        return $this -&gt; getMsgParamNotEmpty();   } }  public function isEmailValid($email){    return filter_var($email, FILTER_VALIDATE_EMAIL); }  public function getMsgParamNotEmpty(){    $response["result"] = "failure";   $response["message"] = "فيلدها نبايد خالي باشند";   return json_encode($response);  }  public function getMsgInvalidParam(){    $response["result"] = "failure";   $response["message"] = "فيلدها نامعتبر هستند";   return json_encode($response);  }  public function getMsgInvalidEmail(){    $response["result"] = "failure";   $response["message"] = "ايميل نامعتبر است";   return json_encode($response);  } }   How can i show "message" for utf-8 in json?
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
After some gorgeous updates I witness this: How can I withdraw a publication from a predatory (fake) journal and resubmit to a legitimate journal? I have published a paper in a fake journal. I want to withdraw the paper from that journal.   After successful withdrawal from the fake journal, can I can submit the same paper to a legitimate journal? Test for convergence  $$\sum_{n=1}^{\infty} \frac{1}{n^n}$$  I'm at a loss on what to do, is this a geometric series $\frac{1^n}{n^n}$? What do we know about the Ainur who stayed in the Timeless Halls? Suppose my speed is normally 30 feet. I get hit with a Slow spell, reducing my speed to 15 feet, and then I get knocked prone. How many feet of movement do I need to spend in order to stand back up from prone? How many feet of movement do I have left over once I've stood up?  What if I am also hit with a Ray of Frost spell while slowed, reducing my speed to 5 feet for 1 round? Am I able to stand up at all? Check variable equality against a list of values Application of Kirchhoff's laws in circuits with inductors As we know, the  are applicable for conservative electric fields. Now it is applicable for circuits where inductors are present but the field there is not .  So how are the  Kirchhoff's laws  applicable there? Ring and Subring with different Identities Pairs of numbers with a given LCM How to change account profile picture? I can't believe I have to ask this...but, how do I change my account profile picture in Ubuntu 12.04 Desktop? One would think it would be under the "User Accounts" section. Ways to go from A to B(proof) There are a number of times in Lord of the Rings where the "east" is mentioned -- the pirate ships, the slave-driven farms. And of course all of the peoples subservient to Sauron who come to fight Gondor and the West. Are there any maps of the East of Middle-earth, and what is out there? How do I inspect the view hierarchy in iOS? One of the new search hints is wrong Is it possible to configure a TP_Link ADSL router to work with a cable connection? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ Which of the following is most correct?      The distance of the shortest path must not be higher than 10km.   The distance of the shortest path must not be greater than 10km.   The distance of the shortest path must not be bigger than 10km.   Or is there an even better word? Let $A$ be a real square matrix en let $I$ be the identity matrix with the same size. Let $n&gt;0$ be the smallest natural number for which there exist  $a_0,a_1,...a_{n-1} \in {R}$ such that $A^n+a_{n-1}A^{n-1}+....+a_1A+a_0I=O$.  Show that A is invertible if and only if $a_0\neq0 $.  So i need to proof    $A$ invertible $\rightarrow$$a_0 \neq 0$ $a_0 \neq0 \rightarrow$ $A$ invertible    I don't really know where to start with 1, and with 2 I tried to prove it with a contradiction but I don't think it's right either. When is unbalanced data really a problem in Machine Learning? Area51 proposals are being advertised now all over the network?