diff --git a/lua/livepreview/server/utils/content_type.lua b/lua/livepreview/server/utils/content_type.lua index 57f36577..48d19b83 100644 --- a/lua/livepreview/server/utils/content_type.lua +++ b/lua/livepreview/server/utils/content_type.lua @@ -168,7 +168,7 @@ M.mime = { ["csh"] = "application/x-csh", ["csml"] = "chemical/x-csml", ["csp"] = "application/vnd.commonspace", - ["css"] = "text/css", + ["css"] = "text/css; charset=UTF-8", ["cst"] = "application/x-director", ["csv"] = "text/csv", ["c"] = "text/x-c", @@ -344,8 +344,8 @@ M.mime = { ["hqx"] = "application/mac-binhex40", ["h"] = "text/x-c", ["htke"] = "application/vnd.kenameaapp", - ["html"] = "text/html", - ["htm"] = "text/html", + ["html"] = "text/html; charset=UTF-8", + ["htm"] = "text/html; charset=UTF-8", ["hvd"] = "application/vnd.yamaha.hv-dic", ["hvp"] = "application/vnd.yamaha.hv-voice", ["hvs"] = "application/vnd.yamaha.hv-script", @@ -395,7 +395,7 @@ M.mime = { ["jpm"] = "video/jpm", ["json"] = "application/json", ["jsonml"] = "application/jsonml+json", - ["js"] = "text/javascript", + ["js"] = "text/javascript; charset=UTF-8", ["kar"] = "audio/midi", ["karbon"] = "application/vnd.kde.karbon", ["kfo"] = "application/vnd.kde.kformula", @@ -478,7 +478,7 @@ M.mime = { ["mime"] = "message/rfc822", ["mj2"] = "video/mj2", ["mjp2"] = "video/mj2", - ["mjs"] = "text/javascript", + ["mjs"] = "text/javascript; charset=UTF-8", ["mk3d"] = "video/x-matroska", ["mka"] = "audio/x-matroska", ["mks"] = "video/x-matroska", @@ -800,8 +800,8 @@ M.mime = { ["sv4crc"] = "application/x-sv4crc", ["svc"] = "application/vnd.dvb.service", ["svd"] = "application/vnd.svd", - ["svg"] = "image/svg+xml", - ["svgz"] = "image/svg+xml", + ["svg"] = "image/svg+xml; charset=UTF-8", + ["svgz"] = "image/svg+xml; charset=UTF-8", ["swa"] = "application/x-director", ["swf"] = "application/x-shockwave-flash", ["swi"] = "application/vnd.aristanetworks.swi", @@ -848,7 +848,7 @@ M.mime = { ["twds"] = "application/vnd.simtech-mindmapper", ["txd"] = "application/vnd.genomatix.tuxedo", ["txf"] = "application/vnd.mobius.txf", - ["txt"] = "text/plain", + ["txt"] = "text/plain; charset=UTF-8", ["u32"] = "application/x-authorware-bin", ["udeb"] = "application/x-debian-package", ["ufd"] = "application/vnd.ufdl", @@ -972,8 +972,8 @@ M.mime = { ["xer"] = "application/patch-ops-error+xml", ["xfdf"] = "application/vnd.adobe.xfdf", ["xfdl"] = "application/vnd.xfdl", - ["xht"] = "application/xhtml+xml", - ["xhtml"] = "application/xhtml+xml", + ["xht"] = "application/xhtml+xml; charset=UTF-8", + ["xhtml"] = "application/xhtml+xml; charset=UTF-8", ["xhvml"] = "application/xv+xml", ["xif"] = "image/vnd.xiff", ["xla"] = "application/vnd.ms-excel", @@ -990,7 +990,7 @@ M.mime = { ["xltx"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.template", ["xlw"] = "application/vnd.ms-excel", ["xm"] = "audio/xm", - ["xml"] = "application/xml", + ["xml"] = "application/xml; charset=UTF-8", ["xo"] = "application/vnd.olpc-sugar", ["xop"] = "application/xop+xml", ["xpi"] = "application/x-xpinstall", diff --git a/tests/index.html b/tests/index.html new file mode 100644 index 00000000..34e27a5f --- /dev/null +++ b/tests/index.html @@ -0,0 +1,11 @@ + + +
+これは日本語のテストです。
+漢字、ひらがな、カタカナ
+ +