Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
- Subject: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 16 Mar 2009 12:32:40 -0400
I'd say rather that Unicode case translations are extremely well
defined. In excruciating detail, even. But many assumptions no
longer hold: uc(lc(x)) does not necessarily equal uc(x), for instance.
And the result of converting a single character may be two or more
characters.
In general, the result of a case conversion can also depend on the
language (everyone's favorite example: most of the time, lc("I") is
"i" and uc("i") is "I", but in Turkish, lc("I") is "ı" and uc("i") is
"İ"), but a conforming implementation is allowed (nay, required) to
ignore those special cases when the text being manipulated is not
tagged as to its language.
On Mon, Mar 16, 2009 at 12:17 PM, Jon Pugh <email@hidden> wrote:
> At 4:10 PM +0100 3/16/09, KOENIG Yvan wrote:
>>My point is that when we read: (The file is MacOS Roman encoding.)
>>we logically assume that the embedded uppercase() and lowercase() handlers are able to treat the entire MacRoman set, not a small subset.
>
> Technically, the MacRoman aspect of the file's encoding is completely unrelated to the functionality of the lowercase and uppercase methods and is solely related to the encoding of the ‚ signs in the code. So making any assumptions about the code's functionality based on its encoding is foolish at best.
>
> SmartString does all of its string manipulation in native AppleScript unicode. However, the case changing problem isn't even well defined in Unicode. The current routines in question use the old ASCII ordering, which is retained in Unicode albeit augmented by a thousand.
>
> I'm now attempting to remedy this situation by adding additional code to handle the common unicode upper/lowercase translations, but it's having an egregious impact on the code speed and clarity since Unicode case transformations are not well defined.
>
> Jon
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden