def to_utf8(y):
    """
    converts an array of integers to utf8 string
    """
    out = []
    for x in y:
        if x < 128:
            out.append(x)
        elif x < 2048:
            out.append(x >> 6 | 192)
            out.append(x & 63 | 128)
        elif x < 65536:
            out.append(x >> 12 | 224)
            out.append(x >> 6 & 63 | 128)
            out.append(x & 63 | 128)
        else:
            out.append(x >> 18 | 240)
            out.append(x >> 12 & 63)
            out.append(x >> 6 & 63 | 128)
            out.append(x & 63 | 128)
    return ''.join(map(chr, out))
