From 8d47598032cab3a88031c22a0642f4bc4d8e2a5b Mon Sep 17 00:00:00 2001 From: Larry Zhang Date: Sat, 16 Dec 2023 21:46:51 +0800 Subject: [PATCH] bug fix and add .python-version to be ignored. --- .gitignore | 3 ++- charset_mnbvc/api.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57f46c6..85c6364 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ __pycache__/ check_result.csv dist out/ -.VSCodeCounter/ \ No newline at end of file +.VSCodeCounter/ +.python-version diff --git a/charset_mnbvc/api.py b/charset_mnbvc/api.py index 9193b98..1469048 100644 --- a/charset_mnbvc/api.py +++ b/charset_mnbvc/api.py @@ -248,7 +248,7 @@ def get_cn_charset(source_data, source_type="file", mode=1, special_encodings=No # return "UNKNOWN" # return_is_perceivable = is_perceivable(data.decode("unicode_escape")) - # if return_is_perceivable: + # if not return_is_perceivable: # return "UNKNOWN: %s" % return_is_perceivable except Exception as err: