When converting files from xml to html, there appeared a serialization error saying something to the effect that x84 was an illegal html character. The files were written using file:write with parameter $params defined as:

 let $params := <output:serialization-parameters><output:method value="html"/></
output:serialization-parameters>
  
When sending the html directly to the browser (not writing to file and using the above declaration), the browser (chrome) appeared to be ok, and displayed the full html. 

Processing the text through normalize-unicode() didn't help. The error persisted. Is there a way to fix the text before submitting it to file:write()? 



All the best
Lars G Johnsen
National Library of Norway