gh-150771: Fix email serialization for shift_jis and euc-jp (GH-151120) Encode the payload with output_charset instead of input_charset.