Python not identifying a white space character
<p>I am near my wit's end with this problem: Basically, I need to remove a double space gap between words. My program happens to be in Hebrew, but this is the basic idea:</p>

<pre><code>TITLE: ×××××ª â â××©×××ªâ â××××§×¨â
</code></pre>

<p>Notice there is an extra space between the first two words (Herbew reads right to left).</p>

<p>I tried many, many different methods, here are a few:</p>

<pre><code># tried all these with and without unicode
title = re.sub(u'\s+',u' ',title.decode('utf-8'))
title = title.replace("  "," ")
title = title.replace(u"  ×××××ª",u" ×××××ª")
</code></pre>

<p>Until finally I resorted to making a very unnecessary method (some of the formatting got messed up when pasting):</p>

<pre><code>def remove_blanks(s):
    word_list = s.split(" ")
    final_word_list = []
    for word in word_list:
        print "word: " +word
        #tried every qualifier I could think of...
        if not_blank(word) and word!=" " and True != re.match("s*",word):
            print "^NOT BLANK^"
            final_word_list.append(word)
    return ' '.join(final_word_list)

def not_blank(s):
    while " " in s:
        s = s.replace(" ","")
    return (len(s.replace("\n","").replace("\r","").replace("\t",""))!=0);
</code></pre>

<p>And, to my utter amazement, this is what I got back:</p>

<pre><code>word: ×××××ª
^NOT BLANK^
word: â           #this should be tagged as Blank!!
^NOT BLANK^
word: â××©×××ªâ
^NOT BLANK^
word: â××××§×¨â
^NOT BLANK^
</code></pre>

<p>So apparently my qualifier didn't work. What is going on here?</p>

<p>There was a hiding \xe2\x80\x8e, LEFT-TO-RIGHT MARK. Found it using repr(word). Thanks @mgilson!</p>

python regex