diff --git a/core/views/expo.py b/core/views/expo.py
index 57f6eb8..8d67f6f 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -341,7 +341,7 @@ def editexpopage(request, path):
                 return render(request,'errors/generic.html', {'message': message})
 
             try:
-                cp_add = subprocess.run([git, "add", filename], cwd=cwd, capture_output=True, text=True)
+                cp_add = subprocess.run([git, "add", filename.encode(sysdefaultencoding)], cwd=cwd, capture_output=True, text=True)
                 if cp_add.returncode != 0:
                     msgdata = 'Ask a nerd to fix this.\n\n' + cp_add.stderr + '\n\n' + cp_add.stdout  + '\n\nreturn code: ' + str(cp_add.returncode)
                     message = f'CANNOT git on server for this file {filename}. Edits saved but not added to git.\n\n' + msgdata