def clean_column_name_sql_dump(i, line, hist, sep=';'):
    """
    Removes quotes in a line which looks like:

    ::

        0; "a"; 'j"'; "r;"

    @param      i       line number (unused)
    @param      line    line to process
    @param      hist    distribution of the number of columns
    @param      sep     line separator
    @return             text line, number of columns
    """
    vals = []
    beg = -1
    ending = ''
    for ii, c in enumerate(line):
        if beg == -1:
            beg = ii
            if c in ('"', "'"):
                nxt = c
            else:
                nxt = sep
        elif c == nxt:
            if c == sep:
                vals.append(line[beg:ii].strip())
                beg = -1
            else:
                nxt = sep
        elif c == '\n':
            ending = c
    if beg != -1:
        vals.append(line[beg:].strip())
    if ending:
        return sep.join(vals) + ending, len(vals)
    else:
        return sep.join(vals), len(vals)
