1
0
mirror of https://github.com/x-hw/amazing-qr.git synced 2025-08-10 22:41:23 +02:00

fixed a problem about characters support

This commit is contained in:
sylnsfar
2016-09-22 14:36:28 +08:00
parent ab89a5f2b9
commit 8a6e96f933
3 changed files with 5 additions and 4 deletions

View File

@@ -21,7 +21,8 @@ from PIL import Image
# See [https://github.com/sylnsfar/qrcode] for more details! # 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()): 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 # check every parameter
if not isinstance(words, str) or any(i not in supported_chars for i in words): if not isinstance(words, str) or any(i not in supported_chars for i in words):

View File

@@ -257,7 +257,7 @@ Optional parameters
* 常用**英文标点符号**和空格 * 常用**英文标点符号**和空格
```console ```console
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space) · , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space)
``` ```

View File

@@ -255,11 +255,11 @@ Optional parameters
* Common punctuations: * Common punctuations:
```console ```console
· , . : ; + - * / \ ~ ! @ # $ % ^ & ` [ ] ( ) ? _ { } | and (space) · , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and (space)
``` ```
``
## Dependencies ## Dependencies