always-tail icon indicating copy to clipboard operation
always-tail copied to clipboard

what type of data is returned by 'line'-event

Open michapixel opened this issue 10 years ago • 4 comments

michapixel avatar Nov 04 '14 12:11 michapixel

a string

jandre avatar Nov 05 '14 18:11 jandre

well i'm getting like "\u00002\u00000\u0000:\u00002\u00000\u0000:\u00001\u00002\u0000 \u0000-\u0000 \u0000R\u0000.\u0000S\u0000H\u0000 \u0000-\u0000 \u0000R\u0000a\u0000d\u0000i\u0000o\u0000 \u0000S\u0000c\u0000h\u0000l\u0000e\u0000s\u0000w\u0000 \u0000-\u0000 \u0000"\u0000P\u0000!\u0000N\u0000K\u0000 \u0000-\u0000 \u0000T\u0000R\u0000Y\u0000 \u0000|\u0000 \u0000R\u0000.\u0000S\u0000H\u0000 \u0000-\u0000 \u0000R\u0000a\u0000d\u0000i\u0000o\u0000 \u0000S\u0000c\u0000h\u0000l\u0000e\u0000s\u0000w\u0000i\u0000g\u0000-\u0000H\u0000o\u0000l\u0000s\u0000t\u0000e\u0000i\u0000n\u0000"\u0000 \u0000w\u0000i\u0000r\u0000d\u0000 \u0000g\u0000e\u0000s\u0000p\u0000i\u0000e\u0000l\u0000t\u0000\r\u0000"

which is not really what i expected :-)

michapixel avatar Nov 05 '14 19:11 michapixel

what is the encoding of this?

michapixel avatar Nov 05 '14 20:11 michapixel

oh I see, the encoding is hardcoded: https://github.com/jandre/always-tail/blob/master/index.js#L65

Your file is probably not utf8 compatible.

SEnd me a pull request that allows you to specify the encoding and I will totally merge it.

jandre avatar Nov 05 '14 23:11 jandre