From 857230def300ab713fde5ce66a9c7f87847c4bfc Mon Sep 17 00:00:00 2001 From: Gustavo Murayama Date: Sat, 13 Apr 2019 11:40:15 -0300 Subject: [PATCH] Translate cp65001 encoding to UTF-8 (#862) --- src/gam.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gam.py b/src/gam.py index 4712c98a..df76bcac 100755 --- a/src/gam.py +++ b/src/gam.py @@ -94,6 +94,12 @@ Go to the following link in your browser: {address} """ +def cp65001(name): + if name.lower() == "cp65001": + return codecs.lookup("utf-8") + +codecs.register(cp65001) + # Override and wrap google_auth_httplib2 request methods so that the GAM # user-agent string is inserted into HTTP request headers. def _request_with_user_agent(request_method):