Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function safeString(text)
- local newText = {}
- for i = 1, #text do
- local val = text:byte(i)
- newText[i] = (val > 31 and val < 127) and val or 63
- end
- return string.char(unpack(newText))
- end
- print(safeString("é")) --Will print "??"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement