Bug fixes for Unicode support.