From e542c73966f8372353aa0e920d0d1c4b413054c9 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 26 Jan 2018 01:05:06 +0100 Subject: [PATCH] Fix UnicodeDecodeError --- pyrogram/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index a290ca0f..78942791 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -16,7 +16,12 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -__copyright__ = "Copyright (C) 2017-2018 Dan Tès ".encode(errors="replace").decode() +import sys + +__copyright__ = "Copyright (C) 2017-2018 Dan Tès ".replace( + "\xe8", + "e" if sys.getfilesystemencoding() == "ascii" else "\xe8" +) __license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)" __version__ = "0.4.2"