Fix utf-8 enforcing hack.

The function getdefaultlocale takes one optional argument,
so the replace should behave the same.