Fixes #2662, reverts #1622:

1. More edgecase unit tests for CLocale.
2. Fix #2662.
3. Revert #1622.