These characters: ≤ « » ¬
…aren’t “plain ASCII”. ASCII only covers the first 127 possible character codes. ASCII is the “safest” character set, however, when you don’t want to worry about how a text file is encoded, and what I’m asking about is what I can use in source code for AppleScript as plain ASCII substitutes for the non-ASCII special characters that AppleScript uses.
“<=” is an example of what I mean. I can type those two plain ASCII characters, < and =, and when a script is compiled, <= is replaced by ≤.
What I’m asking is what I can type, or more to the point, what I can save in a text file which is going to be executed by the command-line command osascript, as plain-ASCII substitutes for AppleScript’s non-ASCII special characters.
I definitely am NOT looking for someone to point me to any character charts. Got plenty of those.
Yes, you mean, for example, a ISO Latin 1 encoded file executed via osascript? You typed “á” in the original text editor, but osascript will read instead “·”, true?
Well, if you don’t know the text encoding, it will be very difficult faking all high-ascii characters… I never tried, but as I said, I could only find the two for <= and >=…
You can allways choose using the “less than or equal to” formula when typing, and avoid absolutely continuation characters and chevrons… (or just use a known encoding, eg mac-roman, to write all those files).
Yep. It would be very nice not to have to worry about character encodings getting screwed up if someone edits the script and their editor doesn’t know the file is MacRoman encoded, or their editor isn’t even capable of doing MacRoman.
“<=” is good enough for me, since it will compile. I might have to use the words “not equal” or “is not”, however, because I tried “<>” and “!=” and I don’t think either of those work as substitutes for the single-character not-equal symbol (I’d have to try again to be sure).
Do you know of a way to say <> without using the single-character versions of << and >>? (It doesn’t work as I typed it, by the way, I’m just getting lazy about forcing BBCode to accept special characters.)
The only workarounds I can think about is using UTF-16 (aka “Unicode text”) or using the shell as a bridge (which inputs and outputs UTF-8) → do shell script “cat utf8encodedfile.txt” → do shell script “echo -n ‘á’ > utf8encodedfile.txt”. It doesn’t exist an equivalent for class-utf8 nor for chevrons (as far as I know)…