diff options
Diffstat (limited to 'node_modules/iconv-lite/lib/index.js')
-rw-r--r-- | node_modules/iconv-lite/lib/index.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js index ac1403c50..10aced42d 100644 --- a/node_modules/iconv-lite/lib/index.js +++ b/node_modules/iconv-lite/lib/index.js @@ -1,6 +1,10 @@ -"use strict" +"use strict"; -var bomHandling = require('./bom-handling'), +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("buffer").Buffer; + +var bomHandling = require("./bom-handling"), iconv = module.exports; // All codecs and aliases are kept here, keyed by encoding name/alias. @@ -139,3 +143,6 @@ if (nodeVer) { require("./extend-node")(iconv); } +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files are loaded not with utf-8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} |