Set locale, remove trailing whitespace.