UTF-8 regular expressions fail when working with non UTF-8 strings