include_ranges = [(33, 33), (35, 38), (40, 126), (161, 172), (174, 255), (
    256, 383), (384, 591), (11360, 11391), (5792, 5872), (880, 887), (890, 
    894), (900, 906), (908, 908)]
alphabet = [get_char(code_point) for current_range in include_ranges for
    code_point in range(current_range[0], current_range[1] + 1)]
return ''.join(random.choice(alphabet) for i in range(length))
if __name__ == '__main__':
    pass
Generate random UTF-8 string in Python