Re: Unicode characters
Re: Unicode characters
- Subject: Re: Unicode characters
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 08 Apr 2003 09:33:46 -0700
On 4/8/03 12:44 AM, "Jonas Salling" <email@hidden> wrote:
>
I'd like to build a string with a Unicode paragraph end character in
>
it. I was hoping there'd be something like this available:
>
>
"a" & (unicode character 2029) & "b"
>
>
This, however, doesn't seem to be the case. Am I missing something?
Concatenating a plain string ("a") on the left side to a unicode character
on the right side (assuming we can find a way to specify the one you want)
would coerce it all to string anyway (resulting in a placeholder instead of
the Unicode character).
In any case, you can't specify Unicode characters by number as you can ASCII
characters. I hope that will change one of these days, in a later release of
AppleScript. In the meantime, I think you would have to storeUnicode
characters of possible interest in a file, and read it off the file 'as
Unicode text'. If such a file already exists somewhere, with each Unicode
character strung along in its correct indexed place, all you'd have to do
would be to get the such-and-such (decimal Unicode number) character 'as
Unicode text'. Perhaps someone knows if there is such a file or if it would
be feasible to make one.
Assuming you can bag your character somehow, you'd then have to script:
("a" as Unicode text) & unicodeCharacter & "b"
("b" on the extreme right will be coerced to Unicode by the concatenation.)
Then your probalem will be how to inspect the result. You will probably have
to write it to a Unicode file and open it in TextEdit, although perhaps
Script Editor 2 is displaying Unicode results - I haven't checked yet. (JD,
have you?)
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.