On 2009-03-16, at 03:24:45, KOENIG Yvan wrote: English is not the unique language in the world and, even in MacOS Roman there are some characterss which you didn't take care of: œ,Œ,æ,Æ, á, Á, à, À, â, Â, ä, Ä, ã, Ã, å, Å, é, É, è, È, ê, Ê, ë, Ë, ó, Ó, ò, Ò, ô, Ô, ö, Ö, õ, Õ, ú, Ú, ù, Ù, û, Û, ü, Ü, í, Í, ì, Ì, î, Î, ï, Ï, ñ, Ñ,
If you need some built-in Unicode text services, Tcl offers some with very easy calls from AppleScript. Here, I think I'm accounting for all the characters you have mentioned:
set test to "œŒæÆáÁàÀâÂäÄãÃåÅéÉèÈêÊëËóÓòÒôÔöÖõÕúÚùÙûÛüÜíÍìÌîÎïÏñÑçÇøØÿŸπ∏"
set res1 to (do shell script "tclsh <<< " & quoted form of "puts [string toupper {" & test & "}]") set res2 to (do shell script "tclsh <<< " & quoted form of "puts [string tolower {" & test & "}]")
res1 & res2
But there are not only 'toupper' and 'tolower'. On 10.5.6 the result of the following script will show quite a few more:
do shell script "man -t n string > /tmp/TclStringServices.ps;open tmp/TclStringServices.ps;"
(otherwise, enter 'man n string' in Terminal).
Bon appetite, Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch. |