mechanisms and locales are no longer byte strings, because they're
defined as shortstr