Use:

htmlentities($myVar, ENT_QUOTES, 'UTF-8')

PM is all in utf-8