Skip to content
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

allow specifying charset #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

George9Waller
Copy link

@George9Waller George9Waller commented Dec 22, 2021

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 the as_response and as_streamed_response methods which allows you to supply a charset for encoding if you would like something other than utf-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant