Comments (7)
For the sake of people reading along with this thread, from a conversation on IRC:
[Oct 23, 2016] [06:10:39 PM] <joepie91> gajus: it's a UCS-2 thing
[Oct 23, 2016] [06:10:48 PM] <joepie91> UCS-2 is like fixed-width UTF-16
[Oct 23, 2016] [06:11:00 PM] <joepie91> so all ASCII chars are prefixed with a nullbyte
[Oct 23, 2016] [06:11:25 PM] <joepie91> but yes, in canonical text display it doesn't have a graphical representation
from table.
Have you tried debugging this at all?
from table.
Experiencing the same issue here, using version 3.8.3.
Reproducable testcase:
'use strict';
const table = require("table");
table.default([ [ 0, 'PC', 'SC2KSEPC', '1/1', 24, 'Mon, Apr 13, 1998 8:28 PM' ],
[ 1, 'PC', 'SC2KSEPC', '1/1', 24, 'Mon, Apr 13, 1998 8:28 PM' ],
[ 2,
'\u0000P\u0000C\u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000',
'\u0000S\u0000C\u00002\u0000K\u0000S\u0000E\u0000P\u0000C\u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000 \u0000',
'1/1',
25,
'Mon, Apr 13, 1998 8:28 PM' ],
[ 3, '', '', 'undefined/undefined', '', '' ] ]);
Error:
/home/sven/projects/iso-spider/node_modules/table/dist/mapDataUsingRowHeightIndex.js:49
rowHeight[index2][index1] = part;
^
TypeError: Cannot set property '1' of undefined
at _lodash2.default.forEach (/home/sven/projects/iso-spider/node_modules/table/dist/mapDataUsingRowHeightIndex.js:49:35)
at arrayEach (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:522:11)
at Function.forEach (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:9289:14)
at _lodash2.default.forEach (/home/sven/projects/iso-spider/node_modules/table/dist/mapDataUsingRowHeightIndex.js:48:24)
at arrayEach (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:522:11)
at Function.forEach (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:9289:14)
at _lodash2.default.map (/home/sven/projects/iso-spider/node_modules/table/dist/mapDataUsingRowHeightIndex.js:39:22)
at arrayMap (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:645:23)
at Function.map (/home/sven/projects/iso-spider/node_modules/table/node_modules/lodash/lodash.js:9505:14)
at exports.default (/home/sven/projects/iso-spider/node_modules/table/dist/mapDataUsingRowHeightIndex.js:30:39)
Not sure what else there is to debug here, given that I don't know how this module works internally, and the error gives absolutely no useful indication of what might be wrong here.
from table.
What is the purpose of the \u0000
in a string?
from table.
It prints the same thing as far as I can tell:
> console.log('a\u0000b\u0000c\u0000');
VM98:1 a�b�c�
> console.log("a\u0000b\u0000c\u0000");
VM104:1 a�b�c�
Is it safe to strip it out then?
from table.
I tried to reproduce the error but everything works fine.
from table.
This issue could be closed as well, like comment
from table.
Related Issues (20)
- SyntaxError: Invalid regular expression: /(^.{1,0}(\s+|$))|(^.{1,-1}(\\|/|_|\.|,|;|-))/: numbers out of order in {} quantifier HOT 1
- Custom space character HOT 1
- update string-width please HOT 2
- Replace `lodash.clonedeep` and `lodash.truncate` to `lodash` HOT 3
- Merging cells HOT 2
- Drop Node.js 10 HOT 1
- The automated release is failing 🚨 HOT 4
- Module cannot be found error HOT 2
- [bug] package.json main points to wrong location HOT 3
- Warning in DevTools about missing source maps HOT 2
- Allow access to header.content HOT 4
- Headers in Table don't calculate the size correctly if using emoticons like "🧪"
- Alignment is not working HOT 3
- SpanningCells API example causes TS error HOT 2
- Chalk breaks table structure when used with cell spanning.
- Render tables side by side?
- When using truncate, table borders are coloured the same as the cell content.
- (Question) auto adjust width HOT 2
- utils.flatten is prone to stack overflow
- Performance issue with large tables HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from table.