Hmm, the file encoding should already be UTF-8 encoded as that's basically what we do internally.
The only thing that is related to culture when it comes to rendering is the UI culture of template at point of render, which generally uses the language culture you select in the export dialog.
🤔
PS Where are you special characters? In the data that is being rendered? are hard coded in the templates? or both?
I have tried with Danish, English and culture not selected.
We are using these special charecters in the header the places where we are using amount (beløb) and we are gettin it as data from the order, like the city Næstved. So the short answer is both :)
Is there a way i somehow can test your code for '/umbraco/backoffice/vendr/vendrexport/export' to see if i can fix it?
Actually, do you want to try opening the template files in a code editor and check the files formatting? I think it could be this that is the issue. I just tested a local file and it was UTF8 with BOM and I think it's the BOM that is the issue. If you re-save the file as just UTF8 does that fix the issue?
Actuelly. When i open the .csv file in notepad++, it works. But when i open it in Excel it does not work.
When i then save as, in Excel and choose a new .csv utf8 format, it does not change anything, except that when i now open it in notepad++, then it does no longer works there.
However if i make a new document in notepad++ as UTF-8 Without BOM and paste the data in and save it and create it as a new .csv file. Then it works in both notepad++ and Excel.
Hi Bo, when I mentioned template, I meant the razor cshtml template file for the export. I think it might be this that is stored as UTF8 with BOM and is what is influencing the output.
If you open the template file and resave it as just UTF8, is the export output csv file just UTF8 too (without BOM)?
Export csv file encoding
Hi Matt.
We have an issue with Æ, Ø and Å in Danish, when exporting the csv file in VENDR 1.8.6
So my question is, if its possible to add
System.Text.Encoding.UTF8
to the export function?I have tried to add it to the response in the cshtml view:
I also tried to add
;charset=UTF-8
to the mime type:If its not possible in any way now, then my suggestion would be to include it this way in the future:
Hi Bo,
Hmm, the file encoding should already be UTF-8 encoded as that's basically what we do internally.
The only thing that is related to culture when it comes to rendering is the UI culture of template at point of render, which generally uses the language culture you select in the export dialog.
🤔
PS Where are you special characters? In the data that is being rendered? are hard coded in the templates? or both?
Hi Matt.
I have tried with Danish, English and culture not selected.
We are using these special charecters in the header the places where we are using amount (beløb) and we are gettin it as data from the order, like the city Næstved. So the short answer is both :)
Is there a way i somehow can test your code for '/umbraco/backoffice/vendr/vendrexport/export' to see if i can fix it?
Actually, do you want to try opening the template files in a code editor and check the files formatting? I think it could be this that is the issue. I just tested a local file and it was UTF8 with BOM and I think it's the BOM that is the issue. If you re-save the file as just UTF8 does that fix the issue?
Matt
Actuelly. When i open the .csv file in notepad++, it works. But when i open it in Excel it does not work.
When i then save as, in Excel and choose a new .csv utf8 format, it does not change anything, except that when i now open it in notepad++, then it does no longer works there.
However if i make a new document in notepad++ as UTF-8 Without BOM and paste the data in and save it and create it as a new .csv file. Then it works in both notepad++ and Excel.
Hi Bo, when I mentioned template, I meant the razor cshtml template file for the export. I think it might be this that is stored as UTF8 with BOM and is what is influencing the output.
If you open the template file and resave it as just UTF8, is the export output csv file just UTF8 too (without BOM)?
Matt
I misunderstood then.
I have now tried to resave it with UTF-8 and without BOM and its still the same.
Ok, interesting.
I'll have to try and look at what's going on then and run some tests 🤔
Matt
I appreciate that :)
is working on a reply...