Skip to content

Commit

Permalink
Update excel_reader.py这里存在一个潜在问题,这种字符比较方式可能不太符合 Unicode 编码的标准判断方式,而且"…
Browse files Browse the repository at this point in the history
…鿿"这个字符在 Unicode 编码中的位置比较靠后,可能会导致一些非预期的结果或者性能问题
  • Loading branch information
fengdezhen666 authored Oct 23, 2024
1 parent 6c682be commit 411a7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbgpt/app/scene/chat_data/chat_excel/excel_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def process_function(function):

def is_chinese(text):
for char in text:
if "" <= char <= "鿿":
if "\u4e00" <= char <= "\u9fa5": # BMP中的常用汉字范围
return True
return False

Expand Down

0 comments on commit 411a7ae

Please sign in to comment.