diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 84b7984e..9c23de28 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -238,7 +238,13 @@ var IO = Module("io", { }, validateCharset: function validateCharset(charset) { - new TextDecoder(charset); + try { + new TextDecoder(charset); + return true; + } + catch (e) { + return false; + } }, // TODO: there seems to be no way, short of a new component, to change