title: How to properly add hex escapes into a string-literal?
body: <p>When you have string in C, you can add direct hex code inside.</p>
  
  <pre><code>char str[] = "abcde"; // 'a', 'b', 'c', 'd', 'e', 0x00
  char str2[] = "abc\x12\x34"; // 'a', 'b', 'c', 0x12, 0x34, 0x00
  </code></pre>
  
  <p>Both examples have 6 bytes in memory. Now the problem exists if you want to add value <code>[a-fA-F0-9]</code> after hex entry.</p>
  
  <pre><code>//I want: 'a', 'b', 'c', 0x12, 'e', 0x00
  //Error, hex is too big because last e is treated as part of hex thus becoming 0x12e
  char problem[] = "abc\x12e";
  </code></pre>
  
  <p>Possible solution is to replace after definition.</p>
  
  <pre><code>//This will work, bad idea
  char solution[6] = "abcde";
  solution[3] = 0x12;
  </code></pre>
  
  <p>This can work, but it will fail, if you put it as <code>const</code>.</p>
  
  <pre><code>//This will not work
  const char solution[6] = "abcde";
  solution[3] = 0x12; //Compilation error!
  </code></pre>
  
  <p>How to properly insert <code>e</code> after <code>\x12</code> without triggering error?</p>
  
  <hr>
  
  <p>Why I'm asking? When you want to build <em>UTF-8</em> string as constant, you have to use hex values of character if it is larger than ASCII table can hold.</p>