Python Unicode Encode Error when writting to csv (changing exact data) -


pe¥a, humberto j., 86, of miami, florida passed away tuesday, july 7, 2015 @ home after long illness. survived loving wife sharon, children, cristy , jorge, stepson carson, 7 grandchildren , predeceased son, humberto. survived angelita barcena , brother antonio pe¤a. missed all, beloved dachshund, barna. visitation 7:00-10:00 pm july 9, 2015 @ caballero-rivero westchester. funeral mass held @ st. kevin's catholic church, friday july 10, 2015 @ 10:30 am. internment follow. in lieu of flowers, family suggests donations in name jos‚ mart¡ foundation.

i want insert para csv file

// notice = above para //content.text = a_name         try:             a_writter.writerows([[content.text, url, notice]])         except unicodeencodeerror:             try:                 notice = unidecode(notice.encode('utf-8'))                 a_writter.writerows([[content.text, url, notice]])             except unicodeencodeerror:                 content_text_encoded = unidecode(content.text.encode('utf-8'))                 a_writter.writerows([[content_text_encoded, url, notice]]) 

but still instead of

"pe¥a, humberto j."

it prints

"pey=a, humberto j."

how exact encoding above notice?

**unidecode https://pypi.python.org/pypi/unidecode


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -