If I paste text into Dreamweaver, it converts accented letters to the encoded
equivalent. (e.g. "?slendingar : nokkur dr?g a? ?j??arl?singu / Gu?m.
Finnbogason" gets encoded as "Íslendingar : nokkur drög að
þjóðarlýsingu / Guðm. Finnbogason".

How can I call this encoding function from an extension?