Bug fixes in locale generator, and more consistent encoding handling.
Authored by: artyom-beilis 2010-03-07
Parent: [r1082]
Child: [r1084]