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]: Problem with emojis and special characters #187

Open
codydubat opened this issue Nov 11, 2024 · 2 comments
Open

[Bug]: Problem with emojis and special characters #187

codydubat opened this issue Nov 11, 2024 · 2 comments

Comments

@codydubat
Copy link

What happened?

Thank you for your work on this tool!
I found this issue while minifying an html file where it turns the degrees symbol ° and emojis (like 🔥) into some weird characters such as: ┬░ and ƒöÑ.
I couldn't find any config option to disable this behaviour.
Is it a bug or something intended?
Thanks!

Version

7.2.0

What browsers are you seeing the problem on?

No response

Link to reproduce

No response

Relevant log output

No response

Willing to submit a PR?

None

@BoGnY
Copy link

BoGnY commented Nov 22, 2024

I've the same bug.
I think is somethings related to the file encoding, in my case I run html-minifier-terser --collapse-whitespace --use-short-doctype --minify-css true page.html > page-min.html but the created file page-min.html has UTF-16 LE BOM encoding (and file size is x2 of the original file) instead UTF-8..
Converting the file to UTF-8 I get file size is 30% of the original (reduced about 70%) but special chars keep weird.

EDIT: problem is related to cmd/powershell.. running the same command on gitbash create an UTF-8 file

@codydubat
Copy link
Author

@BoGnY Nice discovery, didn't think about it, will do some tests to confirm

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

2 participants