support long artic learn

This commit is contained in:
Liu Zhicong
2023-11-15 20:18:41 -08:00
parent 87fdba9714
commit 2d85981dff
2 changed files with 27 additions and 19 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ class WorkspaceEnvironment(Environment):
return content
else:
async with aiofiles.open(path,'rb') as f:
cur_encode = chardet.detect(await f.read(1024))['encoding']
cur_encode = chardet.detect(await f.read())['encoding']
async with aiofiles.open(path, mode='r', encoding=cur_encode) as f:
await f.seek(pos)