wit icon indicating copy to clipboard operation
wit copied to clipboard

[BUG] DELETE expression - encoding issue

Open mbukovy opened this issue 8 years ago • 2 comments

Hello,

I've got a problem with encoding in DELETE expression endpoint. When I call it from Postman, it works well postmanwit It deletes Žluťoučkýí kůňě and everything's fine.

But when I use php, my log says

[2018-02-15 13:36:48] local.INFO: Wit.ai API DELETE array (
  0 => 'https://api.wit.ai/entities/intent/values/nastaveni/expressions/Žluťoučkýí kůňě',
  1 => 
  array (
  ),
  2 => 
  array (
    'Content-Type' => 'application/json',
    'Authorization' => 'Bearer xxx',
  ),
)  
[2018-02-15 13:36:49] local.INFO: Wit.ai API DELETE RESPONSE array (
  0 => '{
  "deleted" : "Žluťou�_ký�_ kůňě"
}',
  1 => NULL,
  2 => NULL,
)  

And it doesn't delete the expression. I use Guzzle http client and trying app 5a7ef0a3-e607-4913-97a1-17ca0ab3c2b7. I'm sure my string is UTF-8 encoded.

The same problem is with DELETE value https://api.wit.ai/entities/intent/values/Žluťoučké and with every similar request, where there is a name in URL.

Where could be the problem? Your side, or somewhere using Guzzle?

mbukovy avatar Feb 15 '18 12:02 mbukovy

This issue appears on WIndows platform only. On linux server, it works fine.

mbukovy avatar Feb 20 '18 15:02 mbukovy

@mbukovy So it seems to be a client-side issue. Closing.

patapizza avatar Feb 20 '18 19:02 patapizza