I am that I am ! -- QXO

2006-01-20

GSpace v0.2 fix

Fixed GSpace charset encoding problem;
downloadIt

原因是:firefox的内部编码是unicode,要gmail的form要求utf8编码,所有需要一次转码unicode-->utf8
in gaction.js-->CreateFormAndSend中
在语句 var hsis = Components.classes[STRINGIS].createInstance(nsIStringInputStream);
前加入如下语句完成转码: sheader = endcodeToUtf8(sheader);

//------把中文字符转换成Utf8编码------------------------//
function endcodeToUtf8(oStr){
var utfStr = oStr;
var uConv = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
uConv.charset = "UTF-8";
utfStr = uConv.ConvertFromUnicode (oStr);
return utfStr
}

install instructions:
download .xpi file
save to desktop
open firefox
click Tools
click Extensions
Drag and drop .XPI file in the window
restart FF
done

0 Comments:

发表评论

<< Home