I am working on moving text from a csv file to oracle database . I have built the python script for this. There is a field in csv which is in spanish . I know there are 100's of article in stack overflow . I have been breaking my head for last 4 hours unable to fix the issue
Sample text : LATAM PMR - MS Diálisis
I used Chardect to detect the language it said {'confidence': 0.99, 'encoding': 'TIS-620'}
So I went a head and updated my default character encoding in python to TIS-620 as suggested in one of the posts
import sys stdin, stdout = sys.stdin, sys.stdout
reload(sys)
sys.stdin, sys.stdout = stdin, stdout
sys.setdefaultencoding('TIS-620')
But still I am getting the output as
'LATAM PMR - MS Di\xc3\xa1lisis'
I tried with cp1252,latin-1 nothing works I keep getting it as above as
a=LATAM PMR - MS Diálisis
a.encode('cp1252')
a.encode('latin-1)
Can you please help me debug this issue
I want the text as LATAM PMR - MS Diálisis to be loaded into the oracle database