This is the mail archive of the firstname.lastname@example.org
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
RE: text vs binary mode yet again
- To: 'Fergus Henderson' <email@example.com.OZ.AU>, "'firstname.lastname@example.org'" <email@example.com>
- Subject: RE: text vs binary mode yet again
- From: Peter Ring <PRI@cddk.dk>
- Date: Wed, 10 Mar 1999 15:20:43 +0100
- Delivered-To: firstname.lastname@example.org
- Delivered-To: mailing list email@example.com
- Mailing-List: contact firstname.lastname@example.org; run by ezmlm
- Sender: email@example.com
I use cygwin and Gnu tools because I need the functionality that
fileutils, textutils et al. provides, but on a Windows NT box.
And I prefer tar, cat and pipes not to mess with the contents
of my files except when told to.
Problems are no better or worse on Linux. Well, perhaps a bit worse,
since Windows NT has quite good Unicode support. Windows application
are in general better at supporting 'foreign' conventions than
either MacOS or Unix applications (with some editors like Emacs as
But you miss the point completely. In a mixed file system environment,
applications have no way of inferring which convention to follow re.
linebreaks, except not to mess them up. I.e., if a 'text' file appears
to use \xA as record separator, write that; if \xD\xA, write that;
if \xD, write that. For new files, you have to ask the user or infer
from a broader context than 'the current OS'.
BTW, if you are told that a file is a 'text' file, which encoding do
you expect it to use ?
7-bit encoding, ISO 646-1973 IRV (any other in widespread use?)
8-bit encoding, UTF-8, IBM CP-437, MS CP-1252, ISO Latin 1..n, etc.
16-bit encoding, UTF-16, various Japaneese, Chinese, Korean etc.
IMHO, the only thing that 'text' files have in common is that you
can expect some sort of record separator.
From: Fergus Henderson [mailto:firstname.lastname@example.org.OZ.AU]
Sent: Wednesday, March 10, 1999 01:13
Subject: text vs binary mode yet again
If you're using cygwin at all, it's presumably because compatibility
with existing software is of some concern. Otherwise, just use Linux!
> >> Why should I want to open a file in 'text' mode? What if I run
> >> a cygwin application to write a 'text' file that is part of a
> >> MacOS application? I need three different record separators,
> >> and I can't infer which to use just from what OS the
> >> application is running on. BTW, this is an actual example of
> >> what I use cygwin tools for.
In that particular case, you wouldn't want to open the file in text
But there are plenty of other cases where text mode does make sense.
Want to unsubscribe from this list?
Send a message to email@example.com