Fix bug 872178 - UTF-8 encoding lost during ics roundtrip resulting in calendar read error (CAL_UTF8_DECODING_FAILED). r=mmecca
--HG-- extra : rebase_source : 6a5c7978b9613dd287ee9aa293eaf1657910280e
This commit is contained in:
Родитель
527e3dbb5c
Коммит
aac45663e0
|
@ -372,12 +372,10 @@ calIcalComponent.prototype = {
|
|||
},
|
||||
|
||||
serializeToICSStream: function() {
|
||||
let sstream = Components.classes["@mozilla.org/io/string-input-stream;1"]
|
||||
.createInstance(Components.interfaces.nsIStringInputStream);
|
||||
let data = this.innerObject.toString();
|
||||
sstream.setData(data, data.length);
|
||||
return sstream;
|
||||
|
||||
let unicodeConverter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
|
||||
unicodeConverter.charset = "UTF-8";
|
||||
return unicodeConverter.convertToInputStream(this.innerObject.toString());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче