Encoding for OTP 17