def gen_range(start, end):
    """Return a list of the numbers between |start| and |end|.

    This filters out surrogate pairs.
    """
    return [x for x in range(start, end) if x < 0xd800 or x >= 0xe000]