Python ... 在读取的文件中,错误地看到

Python ... 在读取的文件中,错误地看到,python,file,Python,File,我正在将python中的某个文件读入一个变量: with open('Folder\\File.txt') as fileToRead: a=fileToRead.read() 但是,该文件包含字符…(三个点)。无论出于何种原因,这些都被解读为或。为什么会发生这种情况,如何防止这种情况发生,以及在读取文件时是否需要注意其他符号?请尝试: # if the file in the same directory file = "Filename.extension" #else file

我正在将python中的某个文件读入一个变量:

with open('Folder\\File.txt') as fileToRead:
    a=fileToRead.read()
但是,该文件包含字符
(三个点)。无论出于何种原因,这些都被解读为
。为什么会发生这种情况,如何防止这种情况发生,以及在读取文件时是否需要注意其他符号?

请尝试:

# if the file in the same directory 
file = "Filename.extension"
#else
file = "FullDestination/Filename.extension"
with open(file, 'r', encoding='utf-8') as f:
    content = f.readlines()
    print(content)

fileToRead.read().decode('utf-8')

#-*-编码:utf-8-*-
在python脚本的顶部?能否验证它是否是椭圆字符而不是三个点?@Jarad问题已修复,但它实际上是椭圆这是python 2的典型问题。Python2将在2019年后不再维护。因此,如果您开始一个新项目,请尝试使用Python 3的最新版本。但我在win32上使用的是
Python 3.7.2(tags/v3.7.2:9A3ffc0492018年12月23日23:09:28)[MSC v.1916 64位(AMD64)]。这是什么意思?