[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Undesired CRLFs coming from http.request (LuaSocket)
- From: David Given <dg@...>
- Date: Tue, 21 Feb 2012 15:05:34 +0000
Stuart P. Bentley wrote:
> local file = io.open("corrupt-jpeg.jpg",'w')
> Any ideas for how to fix?
Open with 'wb' instead --- you've told it it's a text file, and it's
doing Unix<->DOS line ending conversion.
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Description: OpenPGP digital signature