python-charset-normalizer: Update to 3.3.0

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 85540346fe)
This commit is contained in:
Jeffery To
2023-10-03 22:54:02 +08:00
parent 24e52a75bb
commit 71f226e032
2 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
[ "$1" = python3-charset-normalizer ] || exit 0
python3 - << EOF
import sys
from charset_normalizer import from_bytes
s = 'Bсеки човек има право на образование.'
byte_str = s.encode('cp1251')
result = from_bytes(byte_str).best()
sys.exit(0 if str(result) == s else 1)
EOF