How to properly decode or encode a string in python? -


i have following string giving me following error when try upload database:

string_from_source = 'stringÊ' string_in_dataset = 'string\xe6' 

when try decode or encode, following error:

unicodedecodeerror: 'ascii' codec can't decode byte 0xe6 in position 17: ordinal not in range(128) 

for example, error

'string\xe6'.encode() 'string\xe6'.decode() 'string\xe6'.encode('utf-8') 

i've tried:

'string\xe6'.decode('utf-8') unicodedecodeerror: 'utf8' codec can't decode byte 0xe6 in position 17: unexpected end of data 

is there way eliminate type of error once , all? want exclude special characters.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -