mufeedvh / binserve

A fast production-ready static web server with TLS (HTTPS), routing, hot reloading, caching, templating, and security in a single-binary you can set up with zero code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emojis are not getting Rendered Properly

Tibinsunny opened this issue Β· comments

Hey,
Unicoded Emojies like πŸ˜‹ πŸ“™ are not Getting Rendered Properly.

Eg:
If I edit my "template_variables" in binserve.json to

"template_variables": {
"load_static": "/static/",
"name": "This is test πŸ˜‹"
}

The Index page get rendered as πŸ‘‡

SS

And I believe this is something that should be fixed! Right?

OS:Windows 10 64Bit
Binserve used : binserve-v0.1.0-x86_64-pc-windows-gnu.exe

Hey @Tibinsunny,

Nice Catch! ❀️ This is indeed something to be fixed. I think this issue is caused by Handlebars because that's the package doing all the template rendering work so it seems like this should be fixed on their side although there might some hacky way I can sanitize the template_variables to support Unicode emojis. I will look into it!

Thanks for the detailed issue, I will resolve this ASAP! πŸ‘

Probably related to the UTF-8 flag I mentioned before.

Hello @robjtede,

It was indeed related to the UTF-8 flag .prefer_utf8(true).

Screenshot from 2020-10-14 23-09-45

Thank You @robjtede! β€οΈπŸ™Œ
I will push the fix right away! πŸŽ‰

This issue has been fixed! πŸ‘

Thank You @Tibinsunny @robjtede! β€οΈπŸ™Œ