found this script on another forum.
set plainText to {" ", "\"", "<", ">", "^", "~", "Æ’", ".", " ", "¡", "°", "Å’", "˜", "'", """, """, "¢", "“", "”", "Ëœ", "â„¢", "Å“", "Ÿ", "¡", "¢", "£", "¥", "|", "§", "¨", "©", "ª", "«", "¬", "-", "®", "¯", "°", "±", "´", "µ", "¶", "·", "¸", "º", "»", "¿", "À", "Ã", "Â", "Ã", "Ä", "Ã…", "Æ", "Ç", "È", "É", "Ê", "Ë", "ÃŒ", "Ã", "ÃŽ", "Ã", "Ñ", "Ã’", "Ó", "Ô", "Õ", "Ö", "¥", "Ø", "Ù", "Ú", "Û", "Ü", "ß", "à ", "á", "â", "ã", "ä", "Ã¥", "æ", "ç", "è", "é", "ê", "ë", "ì", "Ã", "î", "ï", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ÿ", "≤", "≥", "∆", "≠", "∂", "∑", "âˆ", "Ï€", "∫", "Ω", "√", "≈", "∞", "š", "ž", "Sˇ", "sˇ", "&"}
set htmlEnt to {" ", """, "<", ">", "ˆ", "˜", "ƒ", "…", "†", "‡", "‰", "Œ", "‘", "’", "“", "”", "•", "–", "—", "˜", "™", "œ", "Ÿ", "¡", "¢", "£", "¥", "¦", "§", "¨", "©", "ª", "«", "¬", "", "®", "¯", "°", "±", "´", "µ", "¶", "·", "¸", "º", "»", "¿", "À", "Á", "", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ñ", "ò", "ó", "ô", "˜", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ÿ", "≤", "≥", "Δ", "≠", "∂", "∑", "∏", "π", "∫", "Ω", "√", "≈", "∞", "‚", "„", "Š", "š", "&"}
set searchString to {"\\t|\\r|\\n", "</?table[^>]*>", "</tr>", "</t[dhf]>", "<[^>]*>", "\\t\\r", "^[[:blank:]]*", "[[:blank:]]*$", "[[:blank:]]*\\t[[:blank:]]*"}
set changeString to {"", "\\r#table#\\r", "\\r", "\\t", "", "\\r", "", "", "\\t"}
tell application "Safari"
activate
set theText to source of document 1
set theText to change searchString into changeString in theText with regexp without case sensitive
set theText to change htmlEnt into plainText in theText
property searchList : {"ä", "Ä", "ë", "Ë", "ï", "Ã", "ö", "Ö", "ü", "Ü", "ÿ"}
property replaceList : {"ä", "Ä", "ë", "Ë", "ï", "Ï", "ö", "Ö", "ü", "Ü", "ÿ"}
to switchText of t from s to r
set text item delimiters to s
set t to t's text items
set text item delimiters to r
tell t to set t to beginning & ({""} & rest)
t
end switchText
to convertText(t)
set d to text item delimiters
considering case
repeat with n from 1 to count searchList
set t to switchText of t from my searchList's item n to my replaceList's item n
end repeat
end considering
set text item delimiters to d
t
end convertText
I don’t think there is a change command in applescript. So it says “Expected end of Line , etc. but found identifier”
I can’t find anything about change at all from searching here or google.