From 843bfa8ba62c1d187647a2eda5f071beefc44a7e Mon Sep 17 00:00:00 2001 From: Martin Green Date: Tue, 21 Jun 2022 22:43:06 +0100 Subject: [PATCH] test to find out locale set in the WSGI enivroment --- core/views/expo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/views/expo.py b/core/views/expo.py index 1efa0e6..277cb7f 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -342,6 +342,12 @@ def editexpopage(request, path): pageform = ExpoPageForm({"html": body, "title": title}) else: body = "### File not found ###\n" + str(filepath) + import sys + import locale + body = body + "\nsys.getdefaultencoding() = " + sys.getdefaultencoding() + body = body + "\nsys.getfilesystemencoding() = " + sys.getfilesystemencoding() + body = body + "\nlocale.getdefaultlocale() = " + locale.getdefaultlocale() + body = body + "\nlocale.getpreferredencoding() = " + locale.getpreferredencoding() pageform = ExpoPageForm({"html": body, "title": "Missing"}) return render(request, 'editexpopage.html', {'path': path, 'form': pageform, })