Bug with string.sub?

there seems to be something strange with string.sub. doesnt seem to work for the lovely swedish letters…

    text("Å",100,100)
    text(string.sub("X",1,1), 100,200)
    text(string.sub("Å",1,1), 100,300) -- displays nothing!

String operations work byte-wise. Å needs two bytes. You’re just displaying the first byte and it isn’t printable. This is why I wrote my utf8 library.

(Are you Scandinavian?)

Ah, thanks! Thought it was a bit more highlevel than that. Yes, I live in Norrköping in Sweden.