What do you want to achieve? I want string.sub to work
What is the issue? string.sub doesn’t work with russian characters for some reason
What solutions have you tried so far? I tried turning the russian characters in the string into their english counterpart on the keyboard but that didn’t work either. What I mean is that for example, an “Ы” would be a “Y”. So the word “пистолет” would be “gbcnjtk”.
local russ = "ГА"
print(string.sub(russ, 2,2))
This code always returns the question mark sign (it’s supposed to say “А”):
It seems to be because characters such as Ы and Г are counted as 2 seperate characters, due to the way Unicode works. Accessing just one of the 2 characters in each returns the question mark.
As for solutions: I’m not entirely sure what the best way of going about it is.