0

I'm posting from windows commandline the folowing curl:

curl -X POST -H "Content-Type: application/json; charset=UTF-8" -k -d "{\"firstName\":\"Marjan\",\"midName\":null,\"lastName\":\"Štekar\",\"address\":\"Kfdsfsd 84b\",\"province\":null,\"country\":\"SI\",\"zipId\":\"5211\",\"zipName\":\"Kojsko\",\"idOrganization\":\"2014042311444948\",\"phoneNum\":\"+386.4336172\",\"faxNum\":\"+386.42226172\",\"email\":\"msss.stsss@adsfsd.si\",\"externalId\":\"2014042214301897\"}" https://domene.arctur.local/rest/contact

And I get the error

org.codehaus.jackson.JsonParseException: Invalid UTF-8 start byte 0x8a at [Source: io.undertow.servlet.spec.ServletInputStreamImpl@298db378; line: 1, column: 51]

If I change the Štekar to Stekar it works ok

The json is copy pasted from a UTF-8 text file

How can I force the comandline to represent the chaarcters as UTF-8

simonC
  • 4,101
  • 10
  • 50
  • 78
  • Maybe you have to turn on Utf8Filter or something like that for your back-end application. – Michał Ziober Apr 23 '14 at 12:22
  • @MichałZiober all the settings that depend on this on the server ar UTF-8 based – simonC Apr 23 '14 at 13:22
  • Did you try to use something else than Windows command line? Maybe it is a problem, see this link http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how. Can you try execute this command with http://onlinecurl.com/ or something like this? – Michał Ziober Apr 23 '14 at 14:52

0 Answers0