def fixquotes(u):
    """
    Given a unicode string, replaces "smart" quotes, ellipses, etc.
    with ASCII equivalents.
    """
    if not u:
        return u
    # Double quotes
    u = u.replace('\u201c', '"').replace('\u201d', '"')
    # Single quotes
    u = u.replace('\u2018', "'").replace('\u2019', "'")
    # Endash
    u = u.replace('\u2014', '--')
    # Ellipses
    u = u.replace('\u2026', '...')
    return u