Revert "Fix utf-8 enforcing hack."

This reverts commit 9905edc92fe8092efa26b15a0b46446cf2a50a10.
Fix utf-8 enforcing hack.

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