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

Bug in concatenation #49

Open
artkanna opened this issue Aug 27, 2019 · 0 comments
Open

Bug in concatenation #49

artkanna opened this issue Aug 27, 2019 · 0 comments

Comments

@artkanna
Copy link

artkanna commented Aug 27, 2019

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.

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

No branches or pull requests

1 participant