codegen: Uppercase strings in ASCII, otherwise broken for some locales

Fixes bug 704468