You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Storing names like "Città" in Neo4j gives error
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
So I decode the string as utf8 and everything seems good:
City.objects.get_or_create(name='Città'.decode('utf8'))
(<City: City object>, True)
True: is created.
If I try again:
City.objects.get_or_create(name='Città'.decode('utf8'))
(<City: City object>, True)
True, created again
City.objects.get_or_create(name='Città'.decode('utf8'))
(<City: City object>, True)
... and again.
using decode with standard characters gives no problems:
City.objects.get_or_create(name='SimCity'.decode('utf8'))
(<City: City object>, True)
City.objects.get_or_create(name='SimCity'.decode('utf8'))
(<City: City object>, False)
The text was updated successfully, but these errors were encountered:
Storing names like "Città" in Neo4j gives error
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128)
So I decode the string as utf8 and everything seems good:
True: is created.
If I try again:
True, created again
using decode with standard characters gives no problems:
The text was updated successfully, but these errors were encountered: