user28019: I'm writing a sketch for a Wemos D1 Mini to display a web page. This works and I can get Unicode characters to display, but if I try to use ones with surrogate pairs like 🔊 I get a compile error;
  s += "\uD83D\uDD0A";

Error

\uD83D is not a valid universal character

How can I get this character in my code?

user45984: There is a nifty new feature in C++11 called string literal, this example shows how to use it with any single line or multi line or utf8 text. You just define starting and ending sequence, in following case --- (starting sequence becomes R"---( and ending sequence )---") and make sure that this sequence does not appear in encapsulated text. This is great for integrating websites into arduino projects:
static const char _index_html[] PROGMEM = R"---(
<html>
<head>
<link rel="icon" type="image/png" href="/favicon.png"/>
</head>
<body>
...
</body>
</html>
)---";


28019: <p>I'm writing a sketch for a Wemos D1 Mini to display a web page. This works and I can get Unicode characters to display, but if I try to use ones with surrogate pairs like &#128266; I get a compile error;</p>

<pre><code>  s += "\uD83D\uDD0A";
</code></pre>

<p>Error</p>

<blockquote>
  <p>\uD83D is not a valid universal character</p>
</blockquote>

<p>How can I get this character in my code?</p>
 45984: <p>There is a nifty new feature in C++11 called <a href="http://en.cppreference.com/w/cpp/language/string_literal" rel="nofollow noreferrer">string literal</a>, this example shows how to use it with any single line or multi line or utf8 text. You just define starting and ending sequence, in following case <code>---</code> (starting sequence becomes <code>R"---(</code> and ending sequence <code>)---"</code>) and make sure that this sequence does not appear in encapsulated text. This is great for integrating websites into arduino projects:</p>

<pre><code>static const char _index_html[] PROGMEM = R"---(
&lt;html&gt;
&lt;head&gt;
&lt;link rel="icon" type="image/png" href="/favicon.png"/&gt;
&lt;/head&gt;
&lt;body&gt;
...
&lt;/body&gt;
&lt;/html&gt;
)---";
</code></pre>
