From e2fb2d1fa1471161936248f2352b49ee6c97869a Mon Sep 17 00:00:00 2001 From: Carlos Villavicencio Date: Wed, 11 Dec 2024 16:35:06 -0500 Subject: [PATCH 1/2] Fix aboutbox/licenses encoding --- python/tk_desktop/licenses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tk_desktop/licenses.py b/python/tk_desktop/licenses.py index 7309ac9e..02aa5f46 100644 --- a/python/tk_desktop/licenses.py +++ b/python/tk_desktop/licenses.py @@ -27,5 +27,5 @@ def __init__(self, parent=None): self.ui = licenses.Ui_Licenses() self.ui.setupUi(self) # setSource seems broken on Qt4, so use setHtml instead. - with open(LICENSE_LOCATION) as f: + with open(LICENSE_LOCATION, encoding="utf-8", errors="replace") as f: self.ui.licenseText.setHtml(f.read()) From e20e993ffb4b50dabfb9034c0bdae6105e2e247b Mon Sep 17 00:00:00 2001 From: Carlos Villavicencio <123113322+carlos-villavicencio-adsk@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:37:12 -0500 Subject: [PATCH 2/2] Update python/tk_desktop/licenses.py Co-authored-by: Julien Langlois <16244608+julien-lang@users.noreply.github.com> --- python/tk_desktop/licenses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tk_desktop/licenses.py b/python/tk_desktop/licenses.py index 02aa5f46..a20977e6 100644 --- a/python/tk_desktop/licenses.py +++ b/python/tk_desktop/licenses.py @@ -27,5 +27,5 @@ def __init__(self, parent=None): self.ui = licenses.Ui_Licenses() self.ui.setupUi(self) # setSource seems broken on Qt4, so use setHtml instead. - with open(LICENSE_LOCATION, encoding="utf-8", errors="replace") as f: + with open(LICENSE_LOCATION, encoding="utf-8") as f: self.ui.licenseText.setHtml(f.read())