I need to split a string and extract words separated by whitespace characters.The source may be in English or Japanese. English whitespace characters include tab and space,
I just found your posting. This is a great explantion about normalizing Unicode characters.
http://en.wikipedia.org/wiki/Unicode_equivalence
I found that many programming languages, like Python, have modules that can implement these normalization rules the Unicode standards. For my purposes, I found the following python code works very well. It converts all unicode variants of whitespace to the ascii range. After the normalization, a regex command can convert all white space to ascii \x32:
import unicodedata
# import re
ucode = u'大変、 よろしくお願い申し上げます。'
normalized = unicodedata.normalize('NFKC', ucode)
# old code
# utf8text = re.sub('\s+', ' ', normalized).encode('utf-8')
# new code
utf8text = ' '.join(normalized.encode('utf-8').split())
Since the first writing, I learned Python's regex (re) module improperly itentifies these whitespace characters and can cause a crash if encountered. It turns out a faster, more reliable method to uses the .split() function.