I am sending from curl to a service with REST API and I don’t understand why the server is not receiving special characters ÆØÅ correct.
When I am doing it from curl in CMD, the server is receiving the Danish characters ÆØÅ incorrect.
When I am using the browser, through StrongLoop API, the characters are correctly inserted.
As far as I have been able to research, I need the charset defined. But this have no effect. Using chcp 65001 and Lucida Console font does not help. I am a bit lost identifying the problem.
This is the command used:
curl -X POST -H "Content-Type: application/json; charset=UTF-8" -H "Accept: application/json" -d "{ \"metadata\": { \"user\": \"aa\", \"version\": \"ED\", \"transaction_date\": \"2016-12-30\", \"context_info\": \"string\" }, \"container\": { \"type\": \"SC\", \"type_source\": \"string\", \"op_status_source\": \"string\", \"identification\": \"øæå\", \"id_source\": \"876332d2321\", \"ver\": 0 }}" "http://xx.com/xx/containers?access_token=xxx
The response:
{"type":"SC","type_source":"string","op_status_source":"string","identification":"���","id_source":"8763wwd32d2321","ver":1}
æøå will either be ∩┐╜∩┐╜∩┐╜", ���, or similar, depending on the chcp.
Also note, the console will display æøå correctly, but not the response.