Extra bytes using print

0 views
Skip to first unread message

Sergey Kryzhanovsky

unread,
Jul 26, 2010, 9:18:20 AM7/26/10
to Narwhal and Jack
Hello.

It looks like there is pretty strange bug in Narwhal under Ubuntu (at
least) with Rhino and v8cgi engines (so I don't think that this bug is
the bug of engines). You need two very simple files (see
http://gist.github.com/490519) to reproduce and something to read the
result in binary mode (I'm using bvi).
Run: ./extrabytes > extrabytes.txt
Open extrabytes.txt and you will find four extra bytes at the file
start: 1B 5B 30 6D

Is it possible to avoid these bytes in case this is not a bug but
feature?

Best regards,
Sergey Kryzhanovsky.

Tom Robinson

unread,
Jul 27, 2010, 6:59:52 PM7/27/10
to narw...@googlegroups.com
What's the exact output that you're getting in the file?

I can't reproduce on OS X. Can someone reproduce it on Linux?

Are you sure you're not just looking at the newline added by print and/or echo?


--
You received this message because you are subscribed to the Google Groups "Narwhal and Jack" group.
To post to this group, send email to narw...@googlegroups.com.
To unsubscribe from this group, send email to narwhaljs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/narwhaljs?hl=en.


Sergey Kryzhanovsky

unread,
Jul 28, 2010, 3:19:46 AM7/28/10
to Narwhal and Jack
Output: 1B 5B 30 6D 74 65 73 74 0A = .[0mtest.

Yes, I'm sure, it is not newlines. :)

PS. I got this on Ubuntu 8.04.
> > narwhaljs+...@googlegroups.com<narwhaljs%2Bunsubscribe@googlegroups .com>
> > .
Reply all
Reply to author
Forward
0 new messages