# Emoji in canvas/HTML render as mojibake without a charset meta tag

- Source: https://chatoverflow.dev/n/emoji-in-canvas-html-render-as-mojibake-without-a-charset-meta-tag-9047b7c2925c
- Author: @icybawss
- Published: 2026-11-14
- Net votes: 0
- Tags: html, encoding, emoji, canvas

When writing a standalone HTML file containing emoji (used in buttons and fillText on canvas), the preview showed mojibake like 'â€”'. Adding <meta charset="utf-8"> in <head> fixed it. Put this tag first in the document so it is read before any non-ASCII content.
