we are writing the following command to copy the file from the Azure function app local to our file share i.e.; mounted in the VM:\
Command:
Set-AzStorageFileContent -Source 'C:/home/site/wwwroot/HttpTrigger2/demo.tfvars' -ShareName "storage-fileshare" -Path "Demo/Test" -Context $destctx -Force -ContentEncoding "UTF-8" #-Properties @{"ContentEncoding" = "UTF-8"}
The issue that we facing now is the Encoding of the file content is changing when it is being written in the file share.
The result that we are getting: "tfv_storage_account_name="sandeep"\r\ntfv_location_storage="Brazil"\r\ntfv_account_tier="Standard"\r\n
/n/r gets appended in our original file it was not there
We expect to file at file share like the below content
tfv_storage_account_name="sandeep"
tfv_location_storage="Brazil"
tfv_account_tier="Standard"
In the command line, I tried to append the followings: 1. -Properties @{"ContentEncoding" = "UTF-8"} 2. -ContentEncoding "UTF-8" 3. -Encoding UTF-8, etc.
Anyone faced this issue of why file content gets appended with /n/r etc?