'Exports the table to a unicode text file at the given path.
Rows in the file are separated with a newline.
Columns in a row are separated with the given separator (by default, comma).
For data types other than string, int, float, bool or None, a custom string encoder can be given.'

def save(self, path, separator=',', encoder=(lambda v: v), headers=False, password=None, **kwargs):

    kwargs.setdefault('delimiter', separator)
    kwargs.setdefault('quoting', csvlib.QUOTE_ALL)
    s = StringIO()
    w = csvlib.writer(s, **kwargs)
    if (headers and (self.fields is not None)):
        w.writerows([[csv_header_encode(name, type) for (name, type) in self.fields]])
    w.writerows([[encode_utf8(encoder(v)) for v in row] for row in self])
    s = s.getvalue()
    s = s.strip()
    s = re.sub('([^"]|^)"None"', '\\1None', s)
    s = (s if (not password) else encrypt_string(s, password))
    f = open(path, 'wb')
    f.write(BOM_UTF8)
    f.write(s)
    f.close()
