Fixed weird locale setting, and also TeX-PDF-mode setting.