Skip to content

Commit

Permalink
fixed a problem about characters support
Browse files Browse the repository at this point in the history
  • Loading branch information
x-hw committed Sep 22, 2016
1 parent ab89a5f commit 8a6e96f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion MyQR/myqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
# 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):
Expand Down
2 changes: 1 addition & 1 deletion README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Optional parameters
* 常用**英文标点符号**和空格

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


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ Optional parameters
* Common punctuations:

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


``

## Dependencies

Expand Down

0 comments on commit 8a6e96f

Please sign in to comment.