Examples ######## Encode ====== .. code-block:: python >>> import characterentities as cent >>> cent.encode(u'Hello \U0001f310 !') u'Hello <strong>🌐</strong>&nbsp;!' >>> cent.encode(u'Hello \U0001f310 !', False) u'Hello 🌐 !'