title: How do I HTML-/ URL-Encode a std::wstring containing Unicode characters?
body: <p>I have another question yet. If I had a std::wstring looking like this:</p>
  
  <blockquote>
    <p>ドイツ語で検索していてこちらのサイトにたどり着きました。</p>
  </blockquote>
  
  <p>How could I possibly get it to be URL-Encoded (<em>%nn</em>, <em>n</em> = 0-9, a-f) to:</p>
  
  <blockquote>
    <p>%E3%83%89%E3%82%A4%E3%83%84%E8%AA%9E%E3%81%A7%E6%A4%9C%E7%B4%A2%E3%81%97%E3%81%A6%E3%81%84%E3%81%A6%E3%81%93%E3%81%A1%E3%82%89%E3%81%AE%E3%82%B5%E3%82%A4%E3%83%88%E3%81%AB%E3%81%9F%E3%81%A9%E3%82%8A%E7%9D%80%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82</p>
  </blockquote>
  
  <p>... and also HTML-Encoded (<em>&amp;#nnn</em>(<em>nn</em>);, <em>n</em> = 0-9(?)) to:</p>
  
  <blockquote>
    <p>&#12489;&#12452;&#12484;&#35486;&#12391;&#26908;&#32034;&#12375;&#12390;&#12356;&#12390;&#12371;&#12385;&#12425;&#12398;&#12469;&#12452;&#12488;&#12395;&#12383;&#12393;&#12426;&#30528;&#12365;&#12414;&#12375;&#12383;&#12290;</p>
  </blockquote>
  
  <p>Please help me as I am totally lost right now and don't even know where to start. By the way, performance isn't much important to me right now.</p>
  
  <p>Thanks in advance!</p>