Hi, I am using the traccar php SDK to use the API but I have the following error when registering a user with special characters.
{"responseCode":400,"error":"","response":"Invalid UTF-8 middle byte 0x20\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 9] (through reference chain: org.traccar.model.User[\"name\"])"}
I am using the following command:
$this->curl('/api/users','POST',$cookie,$data,array("Content-Type: application/json"));
I have looked for how to solve it but I have not succeeded, could you guide me on this error?
Thanks a lot
Seems like you are sending incorrectly encoded data.
I have no problems with data like "jose" but when I send "josé" is when I have the problem.
Where could I configure the charset to UTF-8?
Hi, I am using the traccar php SDK to use the API but I have the following error when registering a user with special characters.
{"responseCode":400,"error":"","response":"Invalid UTF-8 middle byte 0x20\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 9] (through reference chain: org.traccar.model.User[\"name\"])"}
I am using the following command:
$this->curl('/api/users','POST',$cookie,$data,array("Content-Type: application/json"));
I have looked for how to solve it but I have not succeeded, could you guide me on this error?
Thanks a lot