decode the unicode string first before checking.