code: func procInstEncoding(s string) string {
  	// TODO: this parsing is somewhat lame and not exact.
  	// It works for all actual cases, though.
  	idx := strings.Index(s, "encoding=")
  	if idx == -1 {
  		return ""
  	}
  	v := s[idx+len("encoding="):]
  	if v == "" {
  		return ""
  	}
  	if v[0] != '\'' && v[0] != '"' {
  		return ""
  	}
  	idx = strings.IndexRune(v[1:], rune(v[0]))
  	if idx == -1 {
  		return ""
  	}
  	return v[1 : idx+1]
  }
docs: // procInstEncoding parses the `encoding="..."` or `encoding='...'`
  // value out of the provided string, returning "" if not found.