fix tests failing on the en_US.UTF-8 locale
Original fix author: Tsukasa Oi