Browse files

Swapped dependency 'codes' for 'iconv'

Avoiding failing installs on several machines/configurations
without compromising funcitonality.
  • Loading branch information...
1 parent e570dfa commit 7db0a3595e2f50131abd7c311d3b0a8ed7dbee52 @jhermsmeier committed Feb 11, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 body/index.js
  2. +2 −2 package.json
View
4 body/index.js
@@ -1,6 +1,6 @@
var mime = require( 'mime-lib' )
-var iconv = require( 'codes' )
+var Iconv = require( 'iconv' ).Iconv
function Body( header, body, envelope ) {
@@ -55,7 +55,7 @@ function Body( header, body, envelope ) {
header.contentType.charset
if( charset ) {
- try { this[0] = iconv.decode( this[0], charset ) }
+ try { this[0] = new Iconv( charset, 'UTF8//TRANSLIT//IGNORE' ).convert( this[0] ).toString() }
catch( e ) { /* unsupported by iconv */ }
}
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "envelope",
- "version": "0.1.2",
+ "version": "0.1.3",
"license": "MIT",
"description": "Mail >> Object",
"kewords": "email, mail, message",
@@ -20,7 +20,7 @@
"dependencies": {
"mime-lib": "",
- "codes": ""
+ "iconv": "~2.0.2"
},
"repository": {

0 comments on commit 7db0a35

Please sign in to comment.