This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Extra spaces in text files in cygwin
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/