diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-08-26 16:26:37 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-08-26 16:26:37 +0100 |
commit | e85c7873dc885c18705c2a77d8487517379d64fb (patch) | |
tree | c59c6030dc0347abea4963f2f11f7175e63ffe46 /synapse/util | |
parent | Merge pull request #252 from matrix-org/erikj/typing_loop (diff) | |
download | synapse-e85c7873dc885c18705c2a77d8487517379d64fb.tar.xz |
Allow non-ascii filenames for attachments
Diffstat (limited to '')
-rw-r--r-- | synapse/util/stringutils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/util/stringutils.py b/synapse/util/stringutils.py index 7a1e96af37..f3a36340e4 100644 --- a/synapse/util/stringutils.py +++ b/synapse/util/stringutils.py @@ -38,6 +38,8 @@ def random_string_with_symbols(length): def is_ascii(s): try: s.encode("ascii") + except UnicodeEncodeError: + return False except UnicodeDecodeError: return False else: |