Re: Write Unicode characters to HTML
Re: Write Unicode characters to HTML
- Subject: Re: Write Unicode characters to HTML
- From: Emile Schwarz <email@hidden>
- Date: Tue, 10 May 2005 17:51:14 +0200
I second what Mark wrote below.
I have a simple modification:
א
^
Mark forgot the '#' character in the decimal NCR (Numeric Character References).
Cheers,
Emile
BTW: Alef was not unknow from my side, but my memory does not remind me that
this was the a letter (thanks to the Sunday morning French TV) in Hebrew.
> So if those bytes are then treated as if they were Mac Roman instead of
And the above is because you use a Macintosh which will not be the same if you
use another platform (Windows for example).
This is why IMHO Unicode and Encodings were created.
> Content-Type: text/plain; charset="iso-8859-1"
The above seems to be MacRoman encoding.
email@hidden wrote:
From: "Mark J. Reed" <email@hidden>
Subject: Re: Write Unicode characters to HTML
To: Gnarlodious <email@hidden>
Cc: Applescript <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
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.
_______________________________________________
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