Created
March 17, 2022 11:00
-
-
Save CEZERT/ceb62147f811839138bba2af5d8345c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qgis.core import * | |
from qgis.gui import * | |
@qgsfunction(args='auto', group='Custom') | |
def findreplace(s, feature, value): | |
chars = [('Â', '') | |
,('Ê', 'E') | |
,(' Î', 'I') | |
,('Ô', 'O') | |
,('Û', 'U') | |
,('Ä', 'A') | |
,('Ë', 'E') | |
,('Ï', 'I') | |
,('Ö', 'O') | |
,('Ü', 'U') | |
,('æ', 'oe') | |
,('À', 'A') | |
,('Æ','AE') | |
,('Ç','C') | |
,('É','E') | |
,('È','E') | |
,('Œ','OE') | |
,('Ù','U') | |
,('¿','OE')] | |
for char, replacewith in chars: | |
s = s.replace(char, replacewith) | |
return s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment