Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
On a client project we have users using languages other than English and are using characters such as à and ê which are being incorrectly displayed on csv exports when using excel. Excel nativly opens a csv file using ansi (
cp1252
) encoding which has different codes for these characters so they are being mis-read. To solve this I have identified that if a csv is encoded in the native windows ansi format both macs and excel on windows natively open read the files correctly without the need for manual conversion each time.Change
I have added an optional parameter
charset
to theas_response
andas_streamed_response
methods which allows you to supply a charset for encoding if you would like something other thanutf-8