reapir encoding