From 8a6e96f933a582d3751d595a548e4fef0a6e8e4a Mon Sep 17 00:00:00 2001 From: sylnsfar Date: Thu, 22 Sep 2016 14:36:28 +0800 Subject: [PATCH] fixed a problem about characters support --- MyQR/myqr.py | 3 ++- README-cn.md | 2 +- README.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MyQR/myqr.py b/MyQR/myqr.py index 48ff26d..7f752ec 100644 --- a/MyQR/myqr.py +++ b/MyQR/myqr.py @@ -21,7 +21,8 @@ from PIL import Image # See [https://github.com/sylnsfar/qrcode] for more details! def run(words, version=1, level='H', picture=None, colorized=False, contrast=1.0, brightness=1.0, save_name=None, save_dir=os.getcwd()): - supported_chars = r'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ·,.:;+-*/\~!@#$%^&`[]()?_{}|' + supported_chars = r"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ··,.:;+-*/\~!@#$%^&`'=<>[]()?_{}|" + # check every parameter if not isinstance(words, str) or any(i not in supported_chars for i in words): diff --git a/README-cn.md b/README-cn.md index 43b18c5..4794470 100644 --- a/README-cn.md +++ b/README-cn.md @@ -257,7 +257,7 @@ Optional parameters * 常用**英文标点符号**和空格 ```console - · , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space) + · , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space) ``` diff --git a/README.md b/README.md index 3469211..7397bd3 100644 --- a/README.md +++ b/README.md @@ -255,11 +255,11 @@ Optional parameters * Common punctuations: ```console - · , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space) + · , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space) ``` -​ +`` ## Dependencies