Thanks for the link.
I am testing with "locale = pl" but
"a".localeCompare("z", "pl") // returns -1
"ą".localeCompare("z", "pl") // returns 1
From my side ID Obj Model description: "Performs a localized comparison of two strings" is not true...
Jarek -- You're right. I thought it worked ok because:
'b'.localeCompare('b') // returns 0
'b'.localeCompare('a') // returns 1
'b'.localeCompare('c') // returns -1
Setting the locale to Polish doesn't help (as it shouldn't, but you never know), nor various variants of the locale string (pl, PL, pl_PL): "ą".localeCompare("z", "pl") keeps returning 1 instead of -1. The examples shown in that link don't work either. Don't know how to make it work. Sorry.
Thanks Jarek for the mention.
As far as I've investigated String.localeCompare() is not properly implemented in ExtendScript. On my platform it just seems locale-independent and simply performs the default UTF16 compare whatever the value of $.locale. Did anybody observe a different behavior?