Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

added 57 characters in body
Source Link

i'm trying to print : Pokémon GO Việt Nam

print u"Pokémon GO Việt Nam"

and i'm getting :

print u"PokÚmon GO Vi?t Nam"
SyntaxError: (unicode error) 'utf8' codec can't decode byte 0xe9 in position 0: unexpected end of data

i've tried :

.encode("utf-8")
.decode("utf-8")
.decode('latin-1').encode("utf-8")
unicode(str.decode("iso-8859-4"))

withMy python version is 2.7.9 , Notepad++ UTF-8 encoding . with no luck , how can i print it ? and i'm encountering this kind of issues all the time , what's the proper way to debug and get the right encoding ?

i'm trying to print : Pokémon GO Việt Nam

print u"Pokémon GO Việt Nam"

and i'm getting :

print u"PokÚmon GO Vi?t Nam"
SyntaxError: (unicode error) 'utf8' codec can't decode byte 0xe9 in position 0: unexpected end of data

i've tried :

.encode("utf-8")
.decode("utf-8")
.decode('latin-1').encode("utf-8")
unicode(str.decode("iso-8859-4"))

with no luck , how can i print it ? and i'm encountering this kind of issues all the time , what's the proper way to debug and get the right encoding ?

i'm trying to print : Pokémon GO Việt Nam

print u"Pokémon GO Việt Nam"

and i'm getting :

print u"PokÚmon GO Vi?t Nam"
SyntaxError: (unicode error) 'utf8' codec can't decode byte 0xe9 in position 0: unexpected end of data

i've tried :

.encode("utf-8")
.decode("utf-8")
.decode('latin-1').encode("utf-8")
unicode(str.decode("iso-8859-4"))

My python version is 2.7.9 , Notepad++ UTF-8 encoding . with no luck , how can i print it ? and i'm encountering this kind of issues all the time , what's the proper way to debug and get the right encoding ?

Source Link

Unicode python Error

i'm trying to print : Pokémon GO Việt Nam

print u"Pokémon GO Việt Nam"

and i'm getting :

print u"PokÚmon GO Vi?t Nam"
SyntaxError: (unicode error) 'utf8' codec can't decode byte 0xe9 in position 0: unexpected end of data

i've tried :

.encode("utf-8")
.decode("utf-8")
.decode('latin-1').encode("utf-8")
unicode(str.decode("iso-8859-4"))

with no luck , how can i print it ? and i'm encountering this kind of issues all the time , what's the proper way to debug and get the right encoding ?

lang-py

AltStyle によって変換されたページ (->オリジナル) /