fix regression with code expecting secrets to be encoded with latin-1