读取txt文件会转义所有引号

时间:2018-06-15 04:12:50

标签: applescript

我正在尝试使用以下方法读取txt文件:

set vDataFile to first file of my_location
set f to POSIX path of (vDataFile as string)
set o to (open for access (POSIX file f))
set txt to (read o for (get eof o))
close access o
return txt

向它提供这样的东西:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

返回所有引物转义:

<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>

如何防止这种情况发生?

0 个答案:

没有答案