title: Detecting and replacing LSEP character (&#xB;)
body: <p>I'm having a hard time with a special character (Unicode U+2028, in XML it shows as &amp;#xB, and in Chrome and Excel cell text, it shows as a L SEP in a dashed square). It's <a href="https://stackoverflow.com/questions/39603446/why-is-this-symbol-showing-up-on-chrome-and-not-firefox-or-edge#39605739">this one</a>:</p>
  
  <p><img src="https://i.stack.imgur.com/FhiMv.jpg" alt="Image"></p>
  
  <p>I've made a macro which opens many webpages, copying part of their contents into separate cells in an excel sheet. Most of the time it performs well, but recently one of the content distributors whose webpage I need to research started using the LSEP character (I don't know why, maybe he's using a new text or HTML editor; I have no contact with any of them).</p>
  
  <p>As a result, Excel can't open the xlsx, returning an XML error in /xl/sharedStrings.xml file. When I renamed MySheet.xlsx to MySheet.xlsx.zip and opened the troubling file, I've discovered the error was caused by that dreadful character. Manually, I removed the LSEP characters, replaced sharedStrings.xml, renamed MySheet.xlsx.zip to MySheet.xlsx and it opened all right.</p>
  
  <p>Having figured out my problem, the next step was to write some piece of code into my macro, to automatically replace the LSEP character with nothing. Being a special character, my approach was to try referring it by <code>ASC</code> function:</p>
  
  <pre><code>    Asc(ActiveCell.Formula)
  </code></pre>
  
  <p>Here was the first spooky thing I got: the code above use to return <code>63</code>, but one time it returned <code>93</code> to the same cell content! Trying <code>ActiveCell.Text</code> got me the same result.</p>
  
  <p>Anyway, I've tried a normal <code>Replace</code>:</p>
  
  <pre><code>    Replace(ActiveCell.Formula, Chr(63), "")
  </code></pre>
  
  <p>The <code>Replace</code> returned exactly the same string, with the infamous LSEP (tried both <code>ActiveCell.Formula</code> and <code>ActiveCell.Text</code>, both returned the same; so I've tried the same with <code>Chr(93)</code> instead of <code>Chr(63)</code>, with no sucess).</p>
  
  <p>Then, I've tried to locate the infamous sneaky ninja pirate LSEP character, so I tried:</p>
  
  <pre><code>    InStr(1, ActiveCell.Formula, Asc(63)) 'Or Asc(93), again the same results
  </code></pre>
  
  <p>The return was <code>0</code>. So, astounded but not defeated, I rubbed my magical lamp and asked this to VBA genius:</p>
  
  <pre><code>    MsgBox "Where's Chr(63)? " &amp; InStr(1, ActiveCell.Formula, Chr(63)) &amp; vbCrLf &amp; _
          "Where's Chr(93)? " &amp; InStr(1, ActiveCell.Formula, Chr(93)) &amp; vbCrLf &amp; _
          "Asc(Right(ActiveCell.Formula, 1)): " &amp; Asc(Right(ActiveCell.Formula, 1))
  </code></pre>
  
  <p>In response, VBA tells me <code>0</code> to first and second lines (like there isn't <code>Chr(63)</code> nor <code>Chr(93)</code>), at the same time telling me the rightmost character of the same string is the Ascii 63!</p>
  
  <p>How is this possible? Does anyone have an idea? I'm totally lost.
  How can I detect and replace this stealthy ninja pirate LSEP character in advance, in my code?</p>
  
  <p>Thanks for your time!</p>