REM ***** BASIC ***** Sub Main End Sub Sub BalaramaToUTF8 oDoc = thisComponent aFind = Array("","","ä", "é", "ü", "å", "è", "ì", "ñ", "ï", "ö", "ò", "ë", "ç", "à", "ù", "ÿ", "û", "Ä", "É", "Ü", "Å", "È", "Ì", "Ñ", "Ï", "Ö", "Ò", "Ë", "Ç", "À", "Ù", "ß", '“', '”', ' ', '‘', '–', '’', '—', '•', '…') aReplace = Array("fi","fl","ā", "ī", "ū", "ṛ", "ṝ", "ṅ", "ṣ", "ñ", "ṭ", "ḍ", "ṇ", "ś", "ṁ", "ḥ", "ḷ", "ḹ", "Ā", "Ī", "Ū", "Ṛ", "Ṝ", "Ṅ", "Ṣ", "Ñ", "Ṭ", "Ḍ", "Ṇ", "Ś", "Ṁ", "Ḥ", "Ḷ", '“', '”', ' ', "‘", '-', "’", '—' , '»', '...') aRayCount = 0 FandR = oDoc.createReplaceDescriptor FandR.SearchCaseSensitive = true FandR.SearchRegularExpression = true While aRayCount <= uBound(aFind) FandR.setSearchString(aFind(aRayCount)) FandR.setReplaceString(aReplace(aRayCount)) aRayCount = aRayCount + 1 oDoc.ReplaceAll(FandR) Wend End Sub