def encodeValue(value): string_org = value try: value = smart_unicode(value) except (UnicodeEncodeError, DjangoUnicodeDecodeError): value = smart_str(value) except Exception: value = string_org return value
def encodeValue(value): string_org = value try: value = smart_unicode(value) except (UnicodeEncodeError, DjangoUnicodeDecodeError): value = smart_str(value) except: value = string_org return value
def encodeValue(string): string_org = string try: string = smart_unicode(string) except (UnicodeEncodeError, DjangoUnicodeDecodeError): string = smart_str(string) except: string = string_org return string
def encodeValue(value): string_org = value try: value = smart_unicode(value) except (UnicodeEncodeError): value = smart_str(value) except: value = string_org return value
def encodeValue(value): string_org = value try: value = smart_unicode(value) except UnicodeEncodeError as e: print("goose.text.encodeValue.UnicodeEncodeError: ", e) value = smart_str(value) except DjangoUnicodeDecodeError as e: print("goose.text.encodeValue.DjangoUnicodeDecodeError: ", e) value = smart_str(value) except Exception as e: print("goose.text.encodeValue.Exception: ", e) value = string_org return value