Use the '_locale' module. This module runs _locale written in RPython (instead of ctypes version). It's not really finished yet; it's enabled by default on Windows.