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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -