Character encoding problem in windows when using --data-binary and special characters like 'Ñ'
2012-02-02 11:54:58 GMT
Hi. I'm Ricardo Vila and i'm new to this mailing list. Briefly: i'm facing a problem using command line curl in windows platforms to send data stored in properties files. I hope somebody can point me a solution. Te complete situation is as follows. At Teimas, we have one app wich accepts REST requests. This requests has a lot of fields so our clients store the parameters in a properties file and then send it with curl and the --data-binary option. Something like this (windows example): curl.exe -i -u :'some_token' -H "Accept: application/x-yaml" -H "Content-type: text/plain" http://ourserver.com/api/nt/ --data-binary @file.properties -X POST This works fine running curl form linux and windows. But in windows appears one problem when in the properties file, appears something like this: documento.productor.centro.nombre=XESTION A CORUÑA, S.A. The Ñ character is encoded (in windows clients) in a way that our server cannot handle it and the rest of the line is trunked. So the value on our server for this example is 'XESTION A CORU' We have tried many things like: - Use --data-urlencode option (with and without changing content-type)(Continue reading)
RSS Feed