I am trying to do a search on a string for the degree symbol ° (hope that displays).
This character has several options, you can type it using alt+0176 or alt+248, unicode is U+00B0.
So far searching for the "literal string" value of the degree symbol in a text variable returns zilch in the script.
The odd thing is it will PRINT to the consol perfectly fine but ONLY if it's typed in the script directly like this °
Code: Select all
print("°")
Code: Select all
string.char(248) -- returns nada, zilch
string.byte("°") -- same here nothing nada zilch
UPDATE
UTF-8 for the degree symbol is 194 176. So the search is "correct-ish". However since lua doesn't understand UTF-8 I still need a way to convert it.
Code: Select all
if (string.byte(txt) == 194) then ...
Any help is appreciated. I could use substitute values as a placeholder but I'm checking each individual letter to draw them to vectors.