unicode - Why don't emojis render in my HTML and/or PHP? -
in effort learn more font rendering/encoding i'm more curious why when copy , paste emojis ππ΅π blank <html> page , save .html file locally on machine, or start local php server , serve files above emojis in there, either show weird characters (Γ°ΕΈ˜‡Γ°ΕΈΒ΅Γ°ΕΈ™Λ) or blank, respectively. yet know when type them straight stack overflow ask textarea, render correctly in browser, , displayed intended when viewing page.
my understanding since mac osx ships correct emoji fonts, should rendered that. disconnect between html page you're looking @ right now, , local 1 saved on computer?
and recommended reading appreciated! :) errr.... π
when web server sends file browser, send set of http headers well, relaying information content type, caching, etc. content-type header informs browser encoding used:
content-type: text/html; charset=utf-8 if open file locally browser gets file , has guess encoding. can declare encoding in html head:
<meta charset="utf-8">
Comments
Post a Comment