Le 23/02/2014 à 01:30, Christopher Stone < email@hidden> a écrit : On Feb 22, 2014, at 14:36, koenig.yvan < email@hidden> wrote: Using character ID versus ASCII character isn't sufficient because we can't define a range of UPPERCASE versus a range of lowercase.
This is why I choose to rely upon a serious case converter.
______________________________________________________________________
Hey Yvan,
Did the OP mention case conversion? I must have missed that...
I usually use the Satimage.osax for upper/lower case conversions in Applescript, but there are other options.
I imagine Shane will chime in with an ASObjC library that will do the job quite nicely as well.
-- Best Regards, Chris
The OP didn't ask for case conversion but converting the character to test into uppercase give us the ability to see if it was an uppercase or a lowercase.
if it was uppercase, the original is equal to the converted if it was a lowercase, the original is not equal to the converted.
As far as I know there is no other way to achieve the test.
Example : character id 7877 which is ể versus character id 7876 which is Ể
And even the given script is not perfect, character id 120146 which is 𝕒 is described as uppercase because the convert case code doesn't change it into 𝔸 It seems that the different pieces of code apply only in the range $0 thru $FFFF.
I guess that Shane will give us the piece of library doing the conversion and maybe will explain why it doesn't apply for ids greater than 65535 ($FFFF).
Yvan KOENIG (VALLAURIS, France) dimanche 23 février 2014 10:35:04
|