perhaps
f.binmode
but i’m on unices so can’t test this.
-a
···
On 12 Feb 2003, Helmut Schottmueller wrote:
Hi there,
I’m trying to send binary data (e.g. gif file) to a web browser using
the following code:f = File.open(gif_filename, “rb”)
content = f.read(filesize)
f.closeprint “Content-type: image/gif\n\n”
print contentI’m using ruby for windows. I’m getting problems because every 0x0a
will be converted to 0x0d 0x0a. Must I use another method to print
binary data for output? I’ve found nothing in the ruby documentation.
–
====================================
Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================