diff --git a/lib/index.js b/lib/index.js index 657701c..0d76c87 100644 --- a/lib/index.js +++ b/lib/index.js @@ -60,7 +60,7 @@ iconv.fromEncoding = iconv.decode; iconv._codecDataCache = {}; iconv.getCodec = function getCodec(encoding) { if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + iconv.encodings = require(__dirname + "/../encodings"); // Lazy load all encoding definitions. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. var enc = iconv._canonicalizeEncoding(encoding);