0

I have a problem when sending a POST request to my couchdb database using curl.

curl -X POST http://admin:password@localhost:3005/fisconet/_find -d '{"selector":{"fields":{"keywords":{"$regex":".*évasion fiscale.*"}}}}' -H "Content-Type: application/json"

This is the error I get:

{"error":"bad_request","reason":"invalid UTF-8 JSON"}

If I remove the accent of the regular expression {"$regex":".*evasion fiscale.*"}, I don't get the error but I don't find what I'm looking for.

Couldn't find anything on the internet that worked.

Thanks

Rodesc
  • 1
  • 1
  • `*.évasion` I don't believe that is a valid regular expression – RamblinRose May 08 '21 at 17:02
  • Also, what is the encoding used with your shell, e.g. for *nix check [this](https://stackoverflow.com/questions/2038733/how-do-i-change-a-shell-scripts-character-encoding). If on windows, you must use a text file as cmd.exe doesn't fly with utf-8; not sure about PowerShell. – RamblinRose May 08 '21 at 17:40

0 Answers0