79603383

Date: 2025-05-02 12:35:56
Score: 1
Natty:
Report link

On the C# side, make sure the RestClient sends the correct headers:
request.AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");

On the PHP side, at the top of your script (before output), force UTF-8 interpretation:

header('Content-Type: text/html; charset=utf-8');

mb_internal_encoding('UTF-8');

Also, ensure your PHP script correctly reads the POST parameters:
$content = json_decode($_POST['content'], true);

Double-check your MySQL connection:
$this->db->exec("SET NAMES utf8mb4");

$this->db->exec("SET CHARACTER SET utf8mb4");

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mahdi