Skip to content

Commit a70b387

Browse files
committed
OGC v1.5.1: Fix saving/loading encoding
Remove releases folder OGC v1.5.1: Fix saving/loading encoding Linux/Windows
1 parent 1c8dfbf commit a70b387

File tree

10 files changed

+4
-4
lines changed

10 files changed

+4
-4
lines changed

App/Linux/OllamaGUIChat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ def save_chat(self):
252252
file_path = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text files", "*.txt"), ("All files", "*.*")])
253253

254254
if file_path:
255-
with open(file_path, "w") as f:
255+
with open(file_path, "w", encoding="utf-8") as f:
256256
for message in self.messages:
257257
f.write(f"{message['role']} : {message['content']}\n")
258258

259259
def load_chat(self):
260260
file_path = filedialog.askopenfilename(filetypes=[("Text files", "*.txt"), ("All files", "*.*")])
261-
with open(file_path, "r") as f:
261+
with open(file_path, "r", encoding="utf-8") as f:
262262
for line in f.readlines():
263263
self.messages.append({"role": "assistant", "content": line})
264264

App/Windows/OllamaGUIChat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ def save_chat(self):
249249
file_path = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text files", "*.txt"), ("All files", "*.*")])
250250

251251
if file_path:
252-
with open(file_path, "w") as f:
252+
with open(file_path, "w", encoding="utf-8") as f:
253253
for message in self.messages:
254254
f.write(f"{message['role']} : {message['content']}\n")
255255

256256
def load_chat(self):
257257
file_path = filedialog.askopenfilename(filetypes=[("Text files", "*.txt"), ("All files", "*.*")])
258-
with open(file_path, "r") as f:
258+
with open(file_path, "r", encoding="utf-8") as f:
259259
for line in f.readlines():
260260
self.messages.append({"role": "assistant", "content": line})
261261

-24.7 MB
Binary file not shown.
-24.8 MB
Binary file not shown.
-19.4 MB
Binary file not shown.
-24.7 MB
Binary file not shown.
-24.8 MB
Binary file not shown.
-24.7 MB
Binary file not shown.
-24.8 MB
Binary file not shown.
-19.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)