Decode UTF-8 with Javascript

To answer the original question: here is how you decode utf-8 in javascript: http://ecmanaut.blogspot.ca/2006/07/encoding-decoding-utf8-in-javascript.html Specifically, function encode_utf8(s) { return unescape(encodeURIComponent(s)); } function decode_utf8(s) { return decodeURIComponent(escape(s)); } We have been using this in our production code for 6 years, and it has worked flawlessly. Note, however, that escape() and unescape() are deprecated. See this.

Set HTML5 doctype with XSLT

I think this is currently only supported by writing the doctype out as text: <?xml version=”1.0″ encoding=”utf-8″?> <xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”> <xsl:output method=”html” encoding=”utf-8″ indent=”yes” /> <xsl:template match=”https://stackoverflow.com/”> <xsl:text disable-output-escaping=’yes’>&lt;!DOCTYPE html&gt;</xsl:text> <html> </html> </xsl:template> </xsl:stylesheet> This will produce the following output: <!DOCTYPE html> <html> </html>