This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why binary mode?


On Feb 22 11:12, Sven Severus wrote:
> $ 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)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Your home is mounted 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

Which explains this behaviour.  The tools are using the default mode,
which is textmode in your case.  I suggest replacing all textmode
mounts with binmode mounts.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]