diff --git a/bin/codepage.njs b/bin/codepage.njs index 6e95090..65576f9 100755 --- a/bin/codepage.njs +++ b/bin/codepage.njs @@ -57,7 +57,7 @@ function process_text(text) { bom[65000] = new Buffer([0x2B, 0x2F, 0x76, 0x2B]); bom[65001] = new Buffer([0xEF, 0xBB, 0xBF]); - var mybom = (program.bom && bom[fr] ? bom[fr] : ""); + var mybom = (program.bom && bom[to] ? bom[to] : ""); var out = to === 65001 ? dec.toString('utf8') : codepage.utils.encode(to, dec); /* if output file is specified */ diff --git a/package.json b/package.json index 61764c6..025020c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codepage", - "version": "1.8.0", + "version": "1.8.1", "author": "SheetJS", "description": "pure-JS library to handle codepages", "keywords": [ "codepage", "iconv", "convert", "strings" ],