title: AngularJS: Change encoding of HTML string
body: <p>I have an email attachment in HTML format and I'd like to inject it into Angular page. I tried this:</p>
  
  <pre><code>$scope.email = $sce.trustAsHtml(email);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;div ng-bind-html="email"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and it indeed does display HTML, but some characters are messed up like you can see here (don't mind the pixelated text, I had to protect peoples privacy :)):
  <img src="https://i.stack.imgur.com/jQvd0.png" alt="enter image description here"></p>
  
  <p>I thought that using <strong>iframe</strong> would help, but result is same:</p>
  
  <pre><code>&lt;iframe srcdoc="{{email}}"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Therefore I assume that I need to <strong>programatically change encoding</strong> of that email (email variable). Is there a way how to do this?</p>