Skip to content

[Serializer] Add BOM support to CSV Encoder #33684

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

Closed
malarzm opened this issue Sep 24, 2019 · 0 comments · Fixed by #33896
Closed

[Serializer] Add BOM support to CSV Encoder #33684

malarzm opened this issue Sep 24, 2019 · 0 comments · Fixed by #33896

Comments

@malarzm
Copy link
Contributor

malarzm commented Sep 24, 2019

Description
As title states, it'd be great to be able to turn BOM on/off through a context option (defaulting to false so it's an opt-in feature).

@fabpot fabpot closed this as completed Oct 13, 2019
fabpot added a commit that referenced this issue Oct 13, 2019
…alarzm)

This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer][CSV] Add context options to handle BOM

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #33684
| License       | MIT
| Doc PR        | symfony/symfony-docs#12461

This allows BOM handling in en/decoded CSV files. To keep current behaviour intact both skipping BOM at the beginning of the CSV and outputting BOM are an opt-in feature.

Personally I'd propose to make `SKIP_INPUT_BOM` default to `false` in 5.0 so the BOM is transparent and people that for some reasons expect BOM characters to be present in the parsed text explicitly opt-out of trimming it.

Commits
-------

3eb3668 Add context options to handle BOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants