Index: gc_lang/fr/oxt/DictOptions/LexiconEditor.py ================================================================== --- gc_lang/fr/oxt/DictOptions/LexiconEditor.py +++ gc_lang/fr/oxt/DictOptions/LexiconEditor.py @@ -3,10 +3,11 @@ # License: MPL 2 import unohelper import uno import json +import urllib.parse import re import os import traceback import platform @@ -419,10 +420,11 @@ #print(lFile) #MessageBox(self.xDocument, "File(s): " + str(lFile), "DEBUG", INFOBOX) spfImported = lFile[0][5:].lstrip("/") # remove file:// if platform.system() != "Windows": spfImported = "/" + spfImported + spfImported = urllib.parse.unquote(spfImported) except: spfImported = os.path.join(os.path.expanduser("~"), "fr.__personal__.json") # workaround if spfImported and os.path.isfile(spfImported): with open(spfImported, "r", encoding="utf-8") as hDst: sJSON = hDst.read() @@ -472,10 +474,11 @@ # lFile = xFilePicker.getSelectedFiles() lFile = xFilePicker.getFiles() spfExported = lFile[0][5:].lstrip("/") # remove file:// if platform.system() != "Windows": spfExported = "/" + spfExported + spfExported = urllib.parse.unquote(spfExported) #spfExported = os.path.join(os.path.expanduser("~"), "fr.personal.json") sJSON = self.xOptionNode.getPropertyValue("personal_dic") if sJSON: with open(spfExported, "w", encoding="utf-8") as hDst: hDst.write(sJSON)