coderaiser / minify

Minifier of js, css, html and img
https://coderaiser.github.io/minify
MIT License
225 stars 29 forks source link

unable to compress js files containing Chinese #113

Closed zhangmingxingAtGit closed 1 year ago

zhangmingxingAtGit commented 1 year ago

When compressing a js file containing Chinese, the output file contains garbled characters :

placeholder = `输入中文,在${engineName}上搜索`;

out :

placeholder=`杈撳叆涓枃锛屽湪${_b}涓婃悳绱;
zhangmingxingAtGit commented 1 year ago

When I use "npm run build" , the compression has no garbled characters. Run "minify a.js > b.js" directly in cmd, and the above garbled characters will appear

coderaiser commented 1 year ago

What version of node are you using?

coderaiser commented 1 year ago

I cannot reproduce this:

image

Feel free to reopen when you have new details