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″

Posted on Aug 18, 2024 6:58 AM

Reply
1 reply

Aug 18, 2024 7:18 AM in response to Yves-de-Mey

Yves-de-Mey wrote:

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?


[Edited by Moderator]


The current stable release of Sonoma including bug fixes, security updates is macOS 14.6.1



The current Script Editor....





To be proactive you can file a bug report / submit your Apple Feedback here: Product Feedback - Apple



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Problem with Applescript 2.8 under MacOs Sonoma 14.6.1

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.