I am trying to compare some files to a datalist. The datalist's names are all in english letters, while the datafiles have the scandinavian "æ" "ø" "å" letters.
an example: the file "Kystnære_måger.shp" and the datalist name "kystnaere_maager" are compared using
filename_UK = ('Kystnære_måger'.lower().replace("ø", "oe") .replace("æ", "ae").replace("å", "aa").replace(".shp", "")) dataname = "kystnaere_maager" print (dataname == filename_UK)
In Pyscripter, using a default Python 3, the value returned is True. If the above statement is run in the python EDITOR window (not the python console) in Qgis 3.2, the returned value is False
can anyone give any explanation for this, or some way to circumvent it? I need to use the editor, as the python console in qgis doesnt handle many lines of code very well.
to be precise, the actual output from the qgis python editor is: exec(open('C:/Users/JonJon/AppData/Local/Temp/tmpnzhq2w9i.py'.encode('utf-8')).read()) False