Skip to content

[FEATURE] Insert utf-8 BOM in generated csv #545

Description

@joshuali925

Is your feature request related to a problem?
If csv contains special characters like , in Excel, it doesn't detect the encoding is utf-8 properly and shows as ’. This is a common encoding problem https://stackoverflow.com/questions/2477452/%C3%A2%E2%82%AC-showing-on-page-instead-of/2477480

What solution would you like?
prepend utf-8 BOM programmatically in reporting to tell client softwares what the encoding is. for example in vim

set bomb
set fileencoding=utf-8
write

using xxd we see efbb bf is prepended, and Excel now displays the quote correctly

What alternatives have you considered?
manually change it in excel to use utf-8, but it's tedious

Do you have any additional context?
Adding BOM can cause other issues, e.g. https://stackoverflow.com/a/13398447. needs some research to see if it needs to be a configurable option

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions