title: Zero Width Character space adding funny characters to Power BI Field
body: <p>Code Sample 1</p>
  <pre><code>Table.AddColumn(
      ToList, 
      &quot;AddInvisibleChars&quot;, 
      each 
      List.Transform(
          [Chars], 
          each 
          if 
          List.Contains(LowerCaseChars, _) 
          then 
          _ &amp; Character.FromNumber(8023) 
          else _
          )
          ),
  </code></pre>
  <p>I use this to fool the Power BI to be case sensitive. When I look under the bonnet it has added these special characters to the field. I export the table using Dax studio into a csv file to see these .</p>
  <pre><code>Po Number - Crâ€‹eâ€‹dâ€‹iâ€‹tâ€‹ Caâ€‹râ€‹dâ€‹
  
  &quot;Zero Width Space in UTF CODES
  UTF-8 (hex)
  0xE2 0x80 0x8B (e2808b)&quot;
  
  â€‹  - These are the extra hidden characters added in this Power BI field under the covers .
  
  €
  20AC
  0128 
  
  â
  00E2
  0226
  
  ‹
  2039
  0139&quot;
  </code></pre>
  <p>What is going on and how do I stop this without switching off the case sensitivity fix for the power Bi front end?</p>
  <p>Character.FromNumber(8023)</p>
  <blockquote>
  <p>Character.FromNumber function is an equivalent of Chr function in VBA or ‘String’.charCodeAt() for Javascript. It returns the Ascii code character from the number. The example shown above will return the non-alphanumerical characters. So by using this, you can replace all the non-alphanumerical characters from the text string.</p>
  </blockquote>
  <p>Trying UTF 8 encoding on this field at the end results in the funny characters changing to a ?.</p>
  <pre><code>Table.TransformColumns(
      #&quot;Replaced Value1&quot;,
      {
       &quot;number&quot; ,
       each if (_ = null or _ = &quot;&quot;) then null
            else Text.FromBinary(Text.ToBinary(_,1251), TextEncoding.UTF8)
      }
    )
  </code></pre>
  <p><a href="https://www.fileformat.info/info/unicode/char/200b/index.htm" rel="nofollow noreferrer">https://www.fileformat.info/info/unicode/char/200b/index.htm</a></p>