mailparser
Advanced tools
Comparing version 0.2.26 to 0.2.27
@@ -824,3 +824,3 @@ | ||
}else{ | ||
this._currentNode.content = this._encodeString(this._currentNode.content); | ||
this._currentNode.content = this._convertStringToUTF8(this._currentNode.content); | ||
} | ||
@@ -1125,2 +1125,13 @@ }else{ | ||
/** | ||
* <p>Converts a string to UTF-8</p> | ||
* | ||
* @param {String} value String to be encoded | ||
* @returns {String} UTF-8 encoded string | ||
*/ | ||
MailParser.prototype._convertStringToUTF8 = function(value){ | ||
value = this._convertString(value, this._currentNode.meta.charset || this.options.defaultCharset || "iso-8859-1").toString("utf-8"); | ||
return value; | ||
}; | ||
/** | ||
* <p>Encodes a header string to UTF-8</p> | ||
@@ -1132,3 +1143,3 @@ * | ||
MailParser.prototype._encodeString = function(value){ | ||
value = this._replaceMimeWords(this._convertString(value, this._currentNode.meta.charset || this.options.defaultCharset || "iso-8859-1").toString("utf-8")); | ||
value = this._replaceMimeWords(this._convertStringToUTF8(value)); | ||
return value; | ||
@@ -1135,0 +1146,0 @@ }; |
{ | ||
"name": "mailparser", | ||
"description": "Asynchronous and non-blocking parser for mime encoded e-mail messages", | ||
"version": "0.2.26", | ||
"version": "0.2.27", | ||
"author" : "Andris Reinman", | ||
@@ -6,0 +6,0 @@ "maintainers":[ |
115203
2489