Encode views