[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binary vs non-binary ports

This page is part of the web mail archives of SRFI 56 from before July 7th, 2015. The new archives for SRFI 56 contain all messages, not just those from before July 7th, 2015.

From: Per Bothner <per@xxxxxxxxxxx>
Subject: Re: binary vs non-binary ports
Date: Fri, 17 Sep 2004 10:22:04 -0700

> (open-input-file path [encoding])
> as in:
> (open-input-file path "utf")
> or:
> (open-input-file path "latin-1")

There are some implementations that already extend
open-{input|output}-file, so I'm afraid that this extention
would conflict with them.  Cf:

Besides, I feel character encoding conversion is much wider topic
than the target of this srfi, so I'd rather suggest to leave it
to another srfi.

If people wish to have the means of ensuring a binary port in
portable way, I'd rather have open-binary-{input|output}-file,
which can be easily implemented on both (a) implementations that
doesn't distinguish binary/character port, and (b) implementations
that requires binary/character distinction at port creation.