UC-encode and decode