fix bug1111985 - undefined locale

Updated @humphd :D