Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.
This repository was archived by the owner on May 26, 2022. It is now read-only.

Add option to change the encoding of the whole exported csv file (not only the content) #871

Description

@Defcon0

Hello,

I'm kind of having the same issue as described here:

#619

When I open a excel exported csv for example in EditPad Lite, the encoding is windows 1252. When I open a csv exported with this php bundle, it's utf8 even though I I did the following:

        $writer->openToBrowser('subscriptions.csv');

        $writer->setShouldAddBOM(false);

$data = array_map(function($value) {
                return iconv( 'UTF-8', 'Windows-1252', $value);
            }, $data);

            $writer->addRow(WriterEntityFactory::createRowFromArray($data));
        $writer->close();

Do you have any idea what I could do? Any help is highly appreciated :-)

Bye Defcon0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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