title: Inserting Unicode with a regex and sed
body: <p>I have a large text file containing a mix of words, numbers and Unicode characters. I would like to print this (current plan is with TeX), but I am having trouble with line breaking of long sequences of characters.</p>
  
  <p>I plan to use <code>sed</code> with bash to rip though the file and replace runs of more than, say, 10 non-whitespace characters with the same run followed by a zero-width space (U+200B). I am having trouble putting the Unicode character in, everything else seems in order.</p>
  
  <pre><code>longStr=reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeealylongstr
  echo $longStr | sed -re 's/(\S{10})/\1\u200b/g'
  </code></pre>
  
  <p>produces </p>
  
  <pre><code>reeeeeeeee200beeeeeeeeee200beeeeeeeeee200beeeeeeeeee200beeeealylon200bgstr
  </code></pre>
  
  <p>What is the right way to insert a Unicode character by code-point in this way?</p>