Special characters of XAMPP and NGINX difference [on hold]

I am migrating a system that is running in xampp to nginx,

so the special characters in xampp work normally, but in the nginx error,

any hint to solve this problem, xampp php and 7.2.5, and nginx php and 7.3.5

the default character set of the server is UTF-8

php is also UTF-8

Has anyone had this problem yet?

the error it gives in api:

Array (     [ext] => Array         (             [0] => Array                 (                     [comanda] => 19                     [taxa] => 0                     [caixa] =>                      [ajuste] => 0                     [cc] => 0                     [cd] => 0                     [ccp] => 0                 )              [1] => Array                 (                     [0] => Array                         (                             [0] => Cachorro quente                             [1] => 1                             [2] => 50                         )                      [1] => Array                         (                             [0] => Amendoim crocante sabor cebola e salsa                             [1] => 1                             [2] => 50                         )                  )              [2] => 2             [3] => Array                 (                 )              [4] => 0             [5] => Array                 (                 )              [6] => 0             [7] => Array                 (                 )              [8] => 0         )      [status] =>      [legenda] => Array         (             [0] => stdClass Object                 (                     [id] => ext                     [legenda] => Não identificado                 )              [1] => stdClass Object                 (                     [id] => total                     [legenda] => Todos                 )          )      [nivel] => 2     [total] => Array         (             [0] => Array                 (                     [comanda] => 19                     [taxa] => 0                     [caixa] =>                      [ajuste] => 0                     [cc] => 0                     [cd] => 0                     [ccp] => 0                 )              [1] => Array                 (                     [0] => Array                         (                             [0] => Cachorro quente                             [1] => 1                             [2] => 50                         )                      [1] => Array                         (                             [0] => Amendoim crocante sabor cebola e salsa                             [1] => 1                             [2] => 50                         )                  )              [2] => 2             [3] => Array                 (                 )              [4] => Array                 (                     [0] => 0                     [1] => 0                 )              [5] => Array                 (                 )              [6] => Array                 (                     [0] => 0                     [1] => 0                 )              [7] => Array                 (                 )              [8] => 0         )  ) 

error in “Não identificado” if remove “ã” pass and work.

{     "message": "Slim Application Error",     "exception": [         {             "type": "RuntimeException",             "code": 5,             "message": "Malformed UTF-8 characters, possibly incorrectly encoded",             "file": "\/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Http\/Response.php",             "line": 353,             "trace": [                 "#0 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/index.php(693): Slim\Http\Response->withJson(Array, 300)",                 "#1 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)",                 "#2 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Handlers\/Strategies\/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)",                 "#3 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Route.php(335): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)",                 "#4 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/classes\/gastroz.class.php(140): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#5 [internal function]: Auth->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))",                 "#6 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/DeferredCallable.php(43): call_user_func_array(Object(Auth), Array)",                 "#7 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))",                 "#8 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))",                 "#9 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#10 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Route.php(313): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#11 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(513): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#12 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#13 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(406): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#14 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(314): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))",                 "#15 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/index.php(4296): Slim\App->run()",                 "#16 {main}"             ]         }     ] }