There\'s a bug I\'m trying to track down here: https://github.com/OscarGodson/EpicEditor/issues/184#issuecomment-8805982
Based on all the information it seems
I agree with both @alohci and @sebastien-lorber answers. But just addressing your orginal issue with just getting
using the setAttribute method
charsetMetaTag.setAttribute("charset", "UTF-8");
and following @sebastien-lorber suggestion, will output
as first child element of head