This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Why binary mode?
- From: Sven Severus <s dot severus at hima dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 22 Feb 2007 11:12:33 +0100
- Subject: Why binary mode?
Hello,
im running a complete Cygwin installation from
2007-02-04 on a Windows XP pro PC, and
it works well so far.
I have the following behaviour:
############## snip ##################
$ mount
c:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type
system (binmode)
C:\cygwin\bin on /usr/bin type system (textmode)
C:\cygwin\lib on /usr/lib type system (textmode)
c:\cygwin\tmp on /tmp type system (binmode)
C:\cygwin on / type system (textmode)
c: on /c type system (textmode)
$ pwd
/home/es_sv
$ echo peng >p.txt && CO=$(cat p.txt) && od -c <<<"$CO"
0000000 p e n g \r \n
0000006
############## snip ##################
I expected the the od output 'p e n g \n' with no
\r in front of the \n.
The file p.txt resides in a directory with textmode
mounting, so I can not see any reason, why cat
reads the file in binary mode.
I think this is a contradiction to Cygwin User's Guide,
chapter "Text and Binary modes", where I found
the statements "Most other programs (such as cat,
cmp, tr) use the default mode." and "If the filename is
specified as a POSIX path and it appears to reside
on a file system that is mounted (i.e. if its pathname
starts with a directory displayed by mount), then the
default is specified by the mount flag."
Is this a bug or am I wrong?
Thanks for any answer.
Best regards,
Sven
--
Mit freundlichen Grüßen
Dipl. Inform. Sven Severus
Softwareentwicklung
----------------------------------------------------------
HIMA Paul Hildebrandt GmbH + CO KG
Abt: Entwicklung Software
Albert-Bassermann-Strasse 28
68782 Bruehl
Germany
Tel: +49 6202 709-289
Fax: +49 6202 709-299
E-Mail: s.severus@hima.com
Internet: www.hima.de
--
HIMA Paul Hildebrandt GmbH + Co KG, Postfach 12 61, 68777 Bruehl bei Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 421017
Ust-ID: DE 144286400, St.Nr: 43038 00190
Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH,
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 420588
Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp, Dipl.-Kfm. Peter Swiczinsky
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/