read encode