rem: const UC_CTRID = "@mozilla.org/intl/scriptableunicodeconverter"; const nsIUnicodeConverter = Components.interfaces.nsIScriptableUnicodeConverter; client.ucConverter = Components.classes[UC_CTRID].createInstance(nsIUnicodeConverter); 
add:  if (!("ucConverter" in client)) { const UC_CTRID = "@mozilla.org/intl/scriptableunicodeconverter"; const nsIUnicodeConverter = Components.interfaces.nsIScriptableUnicodeConverter; client.ucConverter = Components.classes[UC_CTRID].getService(nsIUnicodeConverter); }  client.ucConverter.charset = charset;  if (!client.eventPump.getHook("uc-hook")) { client.eventPump.addHook ([{type: "parseddata", set: "server"}], ucConvertIncomingMessage, "uc-hook"); } } catch (ex) { dd ("Caught exception setting charset to " + charset + "\n" + ex); client.CHARSET = ""; client.eventPump.removeHookByName("uc-hook"); return false; 
context: function setCharset (charset){    client.CHARSET = charset;        if (!charset)    {        delete client.ucConverter;        client.eventPump.removeHookByName("uc-hook");        return;    }        if (!("ucConverter" in client))    {        const UC_CTRID = "@mozilla.org/intl/scriptableunicodeconverter";        const nsIUnicodeConverter =             Components.interfaces.nsIScriptableUnicodeConverter;        client.ucConverter =            Components.classes[UC_CTRID].createInstance(nsIUnicodeConverter);    }    client.ucConverter.charset = charset;    if (!client.eventPump.getHook("uc-hook"))    {        client.eventPump.addHook ([{type: "privmsg", set: "server"}],                                  ucConvertIncomingMessage, "uc-hook");    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/36aff8237dc69d4a8a4336e5c2d05e8896cb29d7/static.js/clean/extensions/irc/xul/content/static.js