-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert BOM to encode CSV correctly #2742
Conversation
This commit fix georchestra#2737
BOMs are a nightmare ... What if the user manually selects UTF-8 when importing the file in LibreOffice? |
Not easy to do for each user with Excel, that's suppose to use LibreOffice only. |
Are there people still using it ? OK, I'd like to collect other people's opinion here before deciding to merge it or not. |
You're right, it's maybe not the best way... |
I'm noy using windows, but normally, if you send the right headers ( |
@@ -96,7 +96,7 @@ class UsersController { | |||
default: | |||
mimetype = `text/${fileType}` | |||
} | |||
const blob = new Blob([result.data], { type: mimetype }) | |||
const blob = new Blob(['\ufeff', result.data], { type: mimetype }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
const blob = new Blob(['\ufeff', result.data], { type: `mimetype; charset=utf-8` })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but text/csv; charset=utf-8
don't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think using BOM is the right solution IMO
If we all agree it's not a good idea, let's close this one. |
I will always agree on
and actually would expand it to
|
Directly from the trenches... I can confirm that it's a nightmare for Excel users to open the file. |
This PR specify the encoding to display specials characters (é,à,ù,...) for user(s) export only.
Link to #2737 .