Backport #18023 Although we reset the locale in a number of places there were several ways of logging in that were missing the same code. Fix #18020 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Gusted <williamzijl7@hotmail.com>