decode and encode strings.