Comparing version 1.0.16 to 1.0.17
@@ -7,2 +7,5 @@ ####################################################################### | ||
ver 1.0.17 | ||
* Bugfix: 土豆插件模板不支持UTF-8。 | ||
ver 1.0.16 | ||
@@ -9,0 +12,0 @@ * 改进:土豆插件支持多层相对路径。 |
{ | ||
"name": "hrt", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "HTTP Rewrite Tool", | ||
@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>", |
@@ -87,12 +87,3 @@ var Fs = require('fs'); | ||
} | ||
var s = ''; | ||
try { | ||
s = Fs.readFileSync(f, { | ||
encoding: 'utf-8' | ||
}); | ||
} catch(e) { | ||
console.error(e); | ||
s = e.toString(); | ||
} | ||
var s = Util.readFileSync(f, 'utf-8'); | ||
s = s.replace(/^\uFEFF/, ''); | ||
@@ -99,0 +90,0 @@ s = s.replace(/(\r\n|\r|\n)\s*/g, ' '); |
1163236
24054