Skip to content

Bug in concatenation #49

Open
Open
@artkanna

Description

@artkanna

There seems to be a bug in the concatenation code surrounding charsets, which adds a character that prevents files from downloading correctly:

When concatenating files, if any of them has a BOM present (or one of the files is UTF-8 encoded or contains unicode), the BOM should be stripped, prepended to the output, and the encoding headers updated.

Each file is modified from here:

$buf = file_get_contents( $fullpath );

What’s needed is a check for a BOM, and if found, replace it with an empty string, and set a flag, and if that flag is found, prepend the BOM on the final output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions