added more robust try-except statements to avoid the unicode related exceptions
added more robust try-except statements to avoid the unicode related exceptions

xiaohan2012/rl-search,xiaohan2012/rl-search,xiaohan2012/rl-search,xiaohan2012/rl-search