This looks dirty as crap, but the try/catch failure series goes in
    the correct order and it's a lot easier to use this most of the
    time, and it works for every situation I needed to use it in. That
    said, I'm kind of hoping nobody ever sees this...

def normalize_input(input,preferunicodeoverstring=False,nfconly=False):
    '''
    This looks dirty as crap, but the try/catch failure series goes in
    the correct order and it's a lot easier to use this most of the
    time, and it works for every situation I needed to use it in. That
    said, I'm kind of hoping nobody ever sees this...
    '''

    if nfconly:
        try:
            return unhexlify(hexlify(unicodedata.normalize('NFC',unicode(input)).encode('utf-8')))
        except:
            try:
                return unhexlify(hexlify(unicodedata.normalize('NFC',input).encode('utf-8'))).decode('utf-8')
            except:
                try:
                    return unhexlify(hexlify(unicodedata.normalize('NFC',unicode(input,'utf-8')).encode('utf-8')))
                except:
                    raise Exception("Unable to NFC normalize.")
    if sys.version_info[0] == 2:
        input = unicode(input)
    if preferunicodeoverstring:
        return unicodedata.normalize('NFKD',input)
    else:
        try:
            return str(unicodedata.normalize('NFKD',input))
        except:
            return unicodedata.normalize('NFKD',input)