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

Strip UTF-8 byte order marks from request body #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hibes
Copy link

@hibes hibes commented Jan 27, 2022

This PR introduces the functionality to automatically strip UTF-8 byte order marks from the request body.

The original trouble that led to this PR is that CSV files created by Microsoft Excel put the UTF-8 byte order marks into the output file. As an example, these are the first three bytes of a file generated with Microsoft Excel:

$ xxd -l 3 ~/Downloads/upload.csv 
00000000: efbb bf                                  ...

When the body was decoded, these bytes remained, causing the first CSV field to have those unusual three bytes (comprising the \ufeff character) at the front, causing key matching based on that key to fail.

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