Use ascii_up/down instead of utf8 up/down when generating identifiers

Fixes bug 731795.