ASCII Encoding question.

By ‘ASC values’ Tim was referring to the values returned by the Asc function – these will not always be ASCII codes (admittedly the name of the function is misleading) but can also be UTF8 codes or codes in some other encoding. Basically Asc returns code points corresponding to the encoding of the string passed as its argument. Now when you want to compare against a printable character such as the Euro symbol you can do this directly – just type a string with the Euro symbol and compare against that. But you cannot type (not in Xojo anyway) a return or a tab, so you need to use the Asc function to get the code point and then compare against, say, 13 for return. Strictly speaking you would need to check whether the code for return is actually 13 in your string’s encoding, but since it is 13 in UTF8, ASCII, and virtually all the other relevant encodings you are safe. Anyway, just as Tim said, the only times you need to use the Asc function is when you are comparing against a character you cannot just type in. (And don’t let Michel confuse you: control characters do have code points in UTF8 and they are the same as the ASCII codes.)

I am not trying to confuse anybody. By definition Unicode is for glyphs.