open file "readme.txt" as "text"
open file "My To-Do List" as "MacRoman"
open file "AUTOEXEC.BAT" as "CP437"
The text
I/O method allows reading and writing as text. The variant
s read and written will be string
s.
If the I/O method is specified as simply "text"
, the value of the textEncoding
property is used to determine the text encoding to use. Otherwise, the name specified as the I/O method is used to determine the text encoding to use.
Read
ing something opened as text
without specifying a length will result in reading characters up to and including the next line break. The text
I/O method uses return
&
newline
, newline
, return
, linesep
, and parasep
as possible line endings.