def convert_to_utf8(string):
    ''' Convert string to UTF8 '''
    if (isinstance(string, unicode)):
        return string.encode('utf-8')
    try:
        u = unicode(string, 'utf-8')
    except __HOLE__:
        return str(string)
    utf8 = u.encode('utf-8')
    return utf8
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/pe_features.py/convert_to_utf8