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
I'm trying to create a StringDocument based on a string that contains utf-8 characters, and all i'm getting is a StringIndexError
My code is as follows
str ="Lo que tengamos que hacer, apoyar, enteegar el ❤️ y el alma por nuestro país. Ivan es el Man. 👏👏👏#Duquepresidente https://t.co/Dr1LdTa5yQ"
sd =StringDocument(str)
And I get the following error
Error showing value of type StringDocument{String}:
ERROR: StringIndexError: invalid index [50], valid nearby indices [48]=>'❤', [51]=>'️'
Followed by a stack trace.
So, I need to know what is the best practice for working with utf strings.