// Unescape takes a quoted string, unquotes, and unescapes it. // // This function performs escaping compatible with GoogleSQL. func unescape(value string, isBytes bool) (string, error) { … } // unescapeChar takes a string input and returns the following info: // // value - the escaped unicode rune at the front of the string. // encode - the value should be unicode-encoded // tail - the remainder of the input string. // err - error value, if the character could not be unescaped. // // When encode is true the return value may still fit within a single byte, // but unicode encoding is attempted which is more expensive than when the // value is known to self-represent as a single byte. // // If isBytes is set, unescape as a bytes literal so octal and hex escapes // represent byte values, not unicode code points. func unescapeChar(s string, isBytes bool) (value rune, encode bool, tail string, err error) { … } func unhex(b byte) (rune, bool) { … } var newlineNormalizer …