Fixed a problem with UTF-8 strings.