Open tomchiverton opened 1 year ago
This also effects serving generated .js files that might contain the real unicode version instead of —
Thanks for reporting. This is probably because readFile
needs to be passed a utf8 encoding at https://github.com/activescott/serverless-aws-static-file-handler/blob/cc2cdf1dc172e76b52b9cb366cfa95719fde298b/src/StaticFileHandler.js#L165
Needs a test too. I'm busy this week but maybe can take a look next week if someone else doesn't first.
Expected behavior:
Can place UTF8 characters such as ⏲️ in a .html file and they render as-is after output
Actual behavior:
â²ï¸
Steps to reproduce the problem:
where public/index.html is as above
Environment:
serverless-aws-static-file-handler 4.0.2 node 18.12.1, framework 3.25.1 (local) 3.25.1v (global), plugin 6.2.2, SDK 4.3.2 Ubuntu 22.04 LTS