Correctly displaying a unicode string from a variable in Python -


i have python script reads text excel file , assigns string variable.

one of these strings follows:

"merhaba öncelikle size iyi çal\u0131\u015fmalar dilerim.ba\u015f\u0131mdan geçen bir"

i've been able display correctly when doing this:

print u"merhaba öncelikle size iyi çal\u0131\u015fmalar dilerim.ba\u015f\u0131mdan geçen bir" 

when run in script this:

merhaba öncelikle size iyi çalışmalar dilerim.başımdan geçen bir 

but can not figure out how convert/display correctly string when receiving them output excel file.

i've tried this:

mystring = "merhaba öncelikle size iyi çal\u0131\u015fmalar dilerim.ba\u015f\u0131mdan geçen bir" print mystring.decode("unicode_escape") 

but prints out:

merhaba öncelikle size iyi çalışmalar dilerim.başımdan geçen bir 


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -