$response = new JsonResponse(['message' => 'Привет!']);
$response->setEncodingOptions(JSON_UNESCAPED_UNICODE);
return $response;
return new JsonResponse($data);
Malformed UTF-8 characters, possibly incorrectly encoded
return new JsonResponse(mb_convert_encoding($data, 'UTF-8', 'UTF-8'));