Bug 883017 - Send MMS with UTF-8 charset; r=gene.lian

Some MMSC seems to be doing bad things if we don't encode/specify the
correct encoding: SFR and Bouygues Telecom delivers UTF-8 destroyed,
while Free Mobile and Orange did a good job. Setting the charset to
UTF-8 makes those four carriers (and probably a lot more) happy.
This commit is contained in:
Alexandre Lissy 2013-06-15 20:23:51 +02:00
parent 4e30f42dab
commit 956a70d8c4

View File

@ -1392,7 +1392,10 @@ MmsService.prototype = {
"content-type": {
"media": "application/smil",
"params": {
"name": "smil.xml"
"name": "smil.xml",
"charset": {
"charset": "utf-8"
}
}
},
"content-length": smil.length,
@ -1409,13 +1412,22 @@ MmsService.prototype = {
let attachment = attachments[i];
let content = attachment.content;
let location = attachment.location;
let params = {
"name": location
};
if (content.type && content.type.indexOf("text/") == 0) {
params.charset = {
"charset": "utf-8"
};
}
let part = {
"headers": {
"content-type": {
"media": content.type,
"params": {
"name": location
}
"params": params
},
"content-length": content.size,
"content-location": location,