simplify transfer_encode_string