X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Tue, 10 Jun 2008 16:30:31 -0700
From: Gary Johnson <garyjohn@spk.agilent.com>
To: cygwin@cygwin.com
Subject: Re: Extra spaces in text files in cygwin
Message-ID: <20080610233030.GB18434@suncomp1.spk.agilent.com>
Mail-Followup-To: cygwin@cygwin.com
References: <17764646.post@talk.nabble.com> <484EFB14.65C9E56F@dessent.net> <17766865.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <17766865.post@talk.nabble.com>
X-Operating-System: SunOS suncomp1 5.8 sparc
User-Agent: Mutt/1.5.17 (2007-11-01)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 2008-06-10, gmarsha11 wrote:
> The backticks contain the actual command that I run.
> 
> 
> I'm not sure about the file's encoding.  How do I tell?
> 
> When I create a new file with vi, I can read the file with no problem.  The
> output is normal.
> 
> These particular text files that I am working with were created by HP Data
> Protector.  I can easily parse and manipulate these files on HPUX servers,
> but the Windows servers lack that functionality.  I thought Cygwin would
> help with this.
> 
> How do I tell what the file's encoding is?

You can look at the contents of the file in binary using

   od -t cx1 abc.txt

for example.  When I do this, I get the following:

   $ cat abc.txt
   This is abc file

   $ od -t cx1  abc.txt
   0000000   T   h   i   s       i   s       a   b   c       f   i   l   e
           54 68 69 73 20 69 73 20 61 62 63 20 66 69 6c 65
   0000020  \n
           0a
   0000021

You can see that in this case, the character coding is ASCII.


HTH,
Gary


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

