use encoding in shape setup_attributes