Le 10 mai 2016 à 15:14, John Dixon <dixo...@hotmail.co.uk> a écrit :

> err... it does work under LC8.. just tried it
> MacBook Pro, El Capitan, OSX 10.11.4


If the text is typed with Livecode, it's work, but with a text opened from a 
file (or the list of files in a folder, like i use in this script, it doesn't 
work).

try : 

on mouseup
   put "Bonjour à tous" into URL("file:" & 
specialfolderpath("Documents")&"/bonjouràtous.txt")
   set the defaultfolder to  specialfolderpath("Documents")
   get the files
   filter it with "bonjour*"
   get noaccents(it)
   answer it
end mouseup

function noaccents myText
put "áàâäãåÄÅÀÃéèêëÊËÈÉíìîïÍÎÏÌóòôöõÓÔÒÕÖúùûüÚÛÙÜÑñçÇ'" into accent
   put "aaaaaaAAAAeeeeEEEEiiiiIIIIoooooOOOOOuuuuUUUUNncC_" into noaccent

   put 0 into cpt
   repeat for each char i in accent
      add 1 to cpt
      --if i = "É" then breakpoint
      replace i with char cpt of noaccent in myText
   end repeat
return myText
end noaccents
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to