Replacing Odd Chars, Too

by clayshannon

HTML

<h1>Another Masterpiece (that was for Theatrical Effect)</h1>

<h2>"Weird" Characters</h2>

<p>In <a href="http://www.codeproject.com/Tips/706884/Insert-Spaces-Between-CrammedTogetherWords-in-docx">In this tip</a>, I showed 

how to wedge a space between words that were run together, such as "DennisRodman or "theWorm", making them "Dennis Rodman" and "the Worm" respectively (so to speak).</p>

<p>That tip, though, only dealt with the "normal" English alphabet (a..Z and A..Z). Since I'm currently working with foreign language documents (Spanish and German, with French and perhaps Italian and Dutch coming later), I realized that I need to consider other possible 

characters, too, both as the ending lowercase letter or other ending character (such as é, í, ñ, ?, !, ", », and ß) and as the beginning uppercase letter or other character, such as ¿, ¡, ", and « </p>

<p>So, if you had a sentence such as this:</p>

<p><em>quéSera, Sera. Was zum Teuful ist hier los!¿se habla aleman?¡No!He said«Hola, muchacha»Das ist gewißMerkwürdig!</em></p>

<p>...running it through this helper method would "aerate" it like so:</p>

<p><em>qué Sera, Sera. Was zum Teuful ist hier los! ¿se habla aleman? ¡No! He said «Hola, muchacha» Das ist gewiß Merkwürdig!</em></p>

<p>Rather than clutter up and complicate the previous code, I wrote another helper function to handle those situations.</p>

<h2>Preliminary Setting Up of Figurative Chairs</h2>
<p>Follow these steps to prepare for the code to follow:</p>
<ol>
<li>Download the DocX DLL library from <a href="https://docx.codeplex.com/">here</a>.&nbsp;</li>
<li>In your Visual Studio project, right-click References, select &quot;Add Reference...&quot; and add <em>docx.dll</em> to the project from wherever you saved it.</li>
<li>Add this to your <code>using </code>section: <pre lang="cs">using Novacode;</pre></li>
</ol>

<p>Add this code to the top of your class, too:</p>
<pre>
        // 65..90 are A..Z; 97..122 are a..z
        const int...