diff --git a/package.json b/package.json
index ee18d08..3dbf5a4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "xlsx",
- "version": "0.1.4",
+ "version": "0.1.5",
"author": "Niggler",
"description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser",
"keywords": [
diff --git a/xlsx.js b/xlsx.js
index 37634c6..e19a402 100644
--- a/xlsx.js
+++ b/xlsx.js
@@ -76,10 +76,11 @@ var encodings = {
'&': '&'
};
+// TODO: CP remap (need to read file version to determine OS)
function unescapexml(text){
var s = text + '';
for(var y in encodings) s = s.replace(new RegExp(y,'g'), encodings[y]);
- return s;
+ return s.replace(/_x([0-9a-fA-F]*)_/g,function(m,c) {return _chr(parseInt(c,16));});
}
function parsexmltag(tag) {
@@ -103,8 +104,8 @@ function parseSheet(data) { //TODO: use a real xml parser
//s.rows = {};
//s.cells = {};
var q = ["v","f"];
- if(!data.match(//))
- data.match(/([^]*)<\/sheetData>/)[1].split("").forEach(function(x) {
+ if(!data.match(//))
+ data.match(/([^]*)<\/sheetData>/m)[1].split("").forEach(function(x) {
if(x === "") return;
var row = parsexmltag(x.match(/]*>/)[0]); //s.rows[row.r]=row.spans;
if(refguess.s.r > row.r - 1) refguess.s.r = row.r - 1;
@@ -125,7 +126,7 @@ function parseSheet(data) { //TODO: use a real xml parser
switch(p.t) {
case 'n': p.v = parseFloat(p.v); break;
case 's': p.v = strs[parseInt(p.v, 10)].t; break;
- case 'str': break; // normal string
+ case 'str': p.v = utf8read(p.v); break; // normal string
case 'b':
switch(p.v) {
case '0': case 'FALSE': case "false": case false: p.v=false; break;