Skip to content

Instantly share code, notes, and snippets.

@odrobnik
Created March 5, 2013 15:53
Show Gist options
  • Save odrobnik/5091275 to your computer and use it in GitHub Desktop.
Save odrobnik/5091275 to your computer and use it in GitHub Desktop.
Unable to create an issue with this text:
DTHTMLWriter does not correctly encode emoji unicode sequences.
It outputs this:
Here is a Smiley: �� and Mr. Poop: ��
which does not display as Emoji in Safari.
NSHTMLWriter does not encode them at all:
<p class="p1"><span class="s1">Here</span><span class="s2"> is a</span>
<span class="s1"> </span><span class="s3">Smil</span><span class="s1">e</span>
<span class="s4">y: 😄</span><span class="s1"> and Mr. Poop: 💩</span></p>
Mail.app does something weird that I don't understand either. It has some sort of equal sign encoding:
Here is a Smiley: <span style=3D"font-size: 11px; =font-family: 'Apple Color Emoji'; ">=F0=9F=98=84</span>
I am at a loss what the correct way is. I have a feeling that it should be encoded for safety.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment