Problem with Applescript 2.8 under MacOs Sonoma 14.6.1
Here is a very simple Applescript:
set File to "/Users/Yves/Essais/Essai2.txt"
set NFic to open for access File
set Content to read NFic
close NFic
display dialog Content
and the file Essai2.txt 3 lines including the last empty:
Coucou1
Turlututu
with Applescript 2.11 (203.1) Applescript 2.7 under macOS Mojave 10.14.6 (iMac retina 4k) :
the display is correct, i.e.
Coucou1
Turlututu
now with Applescript 2.11 (231) Applescript 2.8 under Macos Sonoma 14.6.1 (iMac M3):
the display is truncated, i.e.:
Coucou1
Tur
we can see that the 2nd line is truncated at the beginning of the first 3 spaces and the last 4 characters are missing!
What's happening?
I report that I have searched extensively. I have proposed this problem to Chat GPT and Gemini.Google and neither of these 2 AI's have found a solution.
You can contact me:
_____________________________________________________
Version française :
Voici un Applescript simplissime :
set Fichier to "/Users/Yves/Essais/Essai2.txt"
set NFic to open for access Fichier
set Contenu to read NFic
close NFic
display dialog Contenu
et le fichier Essai2.txt 3 lignes dont la dernière vide :
Coucou1
Turlututu
avec Applescript 2.11 (203.1) Applescript 2.7 sous macOS Mojave 10.14.6 (iMac retina 4k) :
l'affichage est correct, soit
Coucou1
Turlututu
maintenant avec Applescript 2.11 (231) Applescript 2.8 sous Macos Sonoma 14.6.1 (iMac M3) :
l'affichage est tronqué, soit :
Coucou1
Tur
on s'aperçoit que la 2ème ligne est tronquée au début de 3 premiers espaces et manquent les 4 derniers caractères !
Que se passe-t-il ?
Je signale avoir cherche longuement. J'ai proposé ce problème à Chat GPT et à Gemini.Google et aucune de ces 2 IA n'ont trouvé de solution.
Contact :
[Edited by Moderator]
iMac 24″