in reply to lwp encoding problem

You should just send a Content-Type: text/html; charset=iso-8859-1 header, then firefox will parse the page as latin1.