Support UTF-8 messages in git cl upload 🪟

Bug: 1240760
Change-Id: Ib64cd9c9b8c901105f6317bd74b889daa457e4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3101520
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/git_cl.py b/git_cl.py
index 3dd546f..a12483a 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -164,8 +164,8 @@
 def SaveDescriptionBackup(change_desc):
   backup_path = os.path.join(DEPOT_TOOLS, DESCRIPTION_BACKUP_FILE)
   print('\nsaving CL description to %s\n' % backup_path)
-  with open(backup_path, 'w') as backup_file:
-    backup_file.write(change_desc.description)
+  with open(backup_path, 'wb') as backup_file:
+    backup_file.write(change_desc.description.encode('utf-8'))
 
 
 def GetNoGitPagerEnv():