&gt; Using utf-8 as the internal unicode representation is flawed too - index and length operations are slow.<p>And this perfectly illustrates what I posted in another comment elsewhere.  Thinking that doing operations on code points (indexing and length) is the proper thing to do.  You need to use a unicode library to work on graphemes and take into account grapheme clusters.<p>&gt; For regexes, \w matches any unicode word character<p>From what I&#x27;ve read, \w just matches code points.  I did find that the <a href="https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;regex" rel="nofollow">https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;regex</a> module supports \X which matches graphemes as per the unicode spec <a href="http:&#x2F;&#x2F;www.unicode.org&#x2F;reports&#x2F;tr29&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.unicode.org&#x2F;reports&#x2F;tr29&#x2F;</a>.