asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

Issue with French accented characters like é and à #174

Closed ratnofun closed 7 years ago

ratnofun commented 7 years ago

When I am exporting to CSV using this directive the french accented characters are coming like à which means it is taking as UTF8. If the encoding is set to ANSI ideally this should work. Please note that I am using a button. Also we have tried to use charset attribute but still it does not work

Something like below line normally works when using anchor tags data:text/csv;charset=utf-8,%EF%BB%BF

Desired Output : Numéro d'employeur;Date de mise à jour annuelle;Numéro de police Actual Output : Numéro d'employeur;Date de mise à jour annuelle;Numéro de police

ratnofun commented 7 years ago

![ french issue

blotkevin commented 7 years ago

Use add-bom="true" if you want special characters

ratnofun commented 7 years ago

thanks it worked