-
Notifications
You must be signed in to change notification settings - Fork 467
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
Prepend UTF-8 BOM to CSV #279
Comments
Hey @kzkn, thanks for the suggestion. Which versions of MS Excel are affected? |
@ankane |
@ankane |
Hey @kzkn, this isn't something I want to include in the gem right now. Thanks for sharing your approach. Others who need this should be able to use it. |
Agree this would be a nice option. We ran into the same issue with our project. |
I want to be able to prepend UTF-8 BOM (
"\xEF\xBB\xBF"
) to the downloaded CSV file.MS Excel does not correctly recognize UTF-8 (without BOM, it's plain) files containing non-ASCII characters. If you prepend UTF-8 BOM, it will recognize correctly. I think this is a bug of MS Excel, but there is no way to fix it. We have no choice but to avoid it.
I have confirmed that it can be avoided by applying a monkey patch to
Blazer::QueriesController
.SEE: https://stackoverflow.com/questions/2881093/override-a-rails-engine-controller-action
I want to take this as a function.
In my idea, it is good that it can be contorlled with
blazer.yml
to keep compatibility.The text was updated successfully, but these errors were encountered: