I am uploading files to a Confluence API endpoint using a bash script. When I upload file containing special characters in its name such as ä, ö, ü using CURL, they are replaced with '??'. For example, if I upload file with name "Bestätigung.pdf", it is uploaded as "Best??tigung.pdf". However, if I upload the file manually, all is fine, so the encoding problem is on my side.
Below is given the command that I use for the file upload.
fileName="Bestätigung.pdf"
curl -k -v -S -u ${AUTH_CREDENTIALS} -X POST -H "X-Atlassian-Token: nocheck" -H "${API_KEY}" -D "${curlHeaders}" -o "${curlBody}" -F "file=@\"${fileName}\"" -F "comment=Uploaded via API" ${URL}
Can you please give me some suggestions how to keep these special characters in the filename? Thank you!