Re: Write Unicode characters to HTML
Re: Write Unicode characters to HTML
- Subject: Re: Write Unicode characters to HTML
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 10 May 2005 10:04:10 -0400
1. "ASCII character 215" is an oxymoron, sinced ASCII stops at
127. The fact that the construct works for values 128-255, and
yields Mac Roman, just means that the function is badly misnamed.
2. The Hebrew letter alef is not in any way shape or form composed of
(ASCII character 215) & (ASCII character 144). It is
Unicode code point 1488, and has nothing to do with ASCII OR Mac Roman,
since it doesn't exist in either of those character sets.
3. However, if alef is written out as bytes using the "UTF-8"
encoding mechanism, what you get is two bytes whose numeric values are
215 and 144. So if those bytes are then treated as if they were
Mac Roman instead of UTF-8, you
get the two characters you saw. But the fact that copy and paste
behaves that way between those particular two programs is a bug, not a
feature, and not to be relied upon.
4. I would hope that, since OS X seems to be fairly Unicode friendly
(less so than I might wish), there would be a way to compose Unicode
strings in Applescript, but I'm new to the lang and unaware of any such
function. Someone else may be helpful here.
5. If your target is an HTML file, you can always use numeric HTML
entities: put &1488; in your HTML code and you'll get an alef
when you look at it in the browser.
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden