public static StringBuilder decode(String input, StringBuilder output) {
        for (int i = 0; i < input.length(); i = input.offsetByCodePoints(i, 1)) {
            int c = input.codePointAt(i);
            if (c > '~')
                throw new IllegalArgumentException("Input contained character above printable ASCII at position " + i);
            if (c == '{')
                i = decode(input, i, output);
            else
                output.append((char) c);
        }
        return output;
    }
ISO 646.irv:1991 safe unquoting into a StringBuilder instance.

@param input the string to decode
@param output the destination buffer
@return the destination buffer given as input
@throws IllegalArgumentException if the input string contains unexpected or invalid data
vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/Encoder.java