Re: Extra spaces in text files in cygwin

2008-06-11 Thread gmarsha11
Mark J. Reed-2 wrote: > > So pipe the files through iconv to something your munging tools can > deal with and then through iconv again to change it back to whatever > DP is using.. > > > Looks like that's what I'll have to do. It's a minor inconvenience, but doable. It's too bad that the

RE: Extra spaces in text files in cygwin

2008-06-11 Thread Dave Korn
gmarsha11 wrote on 11 June 2008 16:14: > The files are being created by HP Data Protector (backup management > software). After I changed the file, I realized that the next time DP > modifies it, it will change the encoding. DP can read the file when it is > ANSI encoded, but will always write i

Re: Extra spaces in text files in cygwin

2008-06-11 Thread Mark J. Reed
So pipe the files through iconv to something your munging tools can deal with and then through iconv again to change it back to whatever DP is using... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: h

Re: Extra spaces in text files in cygwin

2008-06-11 Thread Gary Johnson
On 2008-06-11, gmarsha11 wrote: > Gary Johnson wrote: > > > > On 2008-06-10, gmarsha11 wrote: > >> > >> Does this mean it's necessary to change the encoding for any files I > >> might > >> need to cat, grep awk, etc.? > > > > I'm no expert on any of this, but as far as I know, all traditional >

Re: Extra spaces in text files in cygwin

2008-06-11 Thread gmarsha11
Gary Johnson wrote: > > On 2008-06-10, gmarsha11 wrote: >> >> Does this mean it's necessary to change the encoding for any files I >> might >> need to cat, grep awk, etc.? > > I'm no expert on any of this, but as far as I know, all traditional > Unix tools that deal with strings consider a st

Re: Extra spaces in text files in cygwin

2008-06-11 Thread Mark J. Reed
On Tue, Jun 10, 2008 at 9:52 PM, René Berber <[EMAIL PROTECTED]> wrote: > "Document.txt" [converted][dos] 1L, 20C > > The "converted" means it wasn't regular text Only for a very limited definition of "regular text". All "converted" actually means that the file was read using a different encoding

Re: Extra spaces in text files in cygwin

2008-06-10 Thread Brian Dessent
René Berber wrote: > If you like to look at what it really is, try: > > $ od -tx2z Document.txt > 000 feff 0054 0068 0069 0073 0020 0069 0073 >..T.h.i.s. .i.s.< > 020 0020 0061 0062 0063 0020 0066 0069 006c > .a.b.c. .f.i.l.< > 040 0065 000d 000a >e.< >

Re: Extra spaces in text files in cygwin

2008-06-10 Thread René Berber
René Berber wrote: Oops! $ od -tx2z Document.txt 000 feff 0054 0068 0069 0073 0020 0069 0073 >..T.h.i.s. .i.s.< 020 0020 0061 0062 0063 0020 0066 0069 006c > .a.b.c. .f.i.l.< 040 0065 000d 000a >e.< 046 So your spaces are really null bytes (some

Re: Extra spaces in text files in cygwin

2008-06-10 Thread René Berber
gmarsha11 wrote: I'm not sure about the file's encoding. How do I tell? If you have "file" installed, its easy: $ file Document.txt Document.txt: Unicode text, UTF-16, little-endian When I create a new file with vi, I can read the file with no problem. The output is normal. Look at the

Re: Extra spaces in text files in cygwin

2008-06-10 Thread Gary Johnson
On 2008-06-10, gmarsha11 wrote: > Ok, have saved the file with Windows notepad as ANSI, Unicode, Unicode big > endian, and UTF-8. > > Both Unicode options give me the output with the extra spaces. ANSI and > UTF-8 allow me to see the files as I would expect to see them. > > Does this mean it's

Re: Extra spaces in text files in cygwin

2008-06-10 Thread gmarsha11
Ok, have saved the file with Windows notepad as ANSI, Unicode, Unicode big endian, and UTF-8. Both Unicode options give me the output with the extra spaces. ANSI and UTF-8 allow me to see the files as I would expect to see them. Does this mean it's necessary to change the encoding for any fil

Re: Extra spaces in text files in cygwin

2008-06-10 Thread Gary Johnson
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 work

Re: Extra spaces in text files in cygwin

2008-06-10 Thread gmarsha11
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 ca

Re: Extra spaces in text files in cygwin

2008-06-10 Thread gmarsha11
I used the backticks to specify the command I used at the command line. When I type that command, I get the contents of the file with spaces before each character (yes, the spaces appear to come before each character). I am installing additional fonts as was suggested earlier. gmarsha11 wrote:

Re: Extra spaces in text files in cygwin

2008-06-10 Thread gmarsha11
Brian Dessent wrote: > > gmarsha11 wrote: > >> then, `cat abc.txt` returns >> >> T h i s i s a b c f i l e >> >> Anyone know what might cause this? > > What do you mean by "[backtick] returns"? Can you paste a full example > testcase? What is the file's encoding? If it's a unicode fil

Re: Extra spaces in text files in cygwin

2008-06-10 Thread Brian Dessent
gmarsha11 wrote: > then, `cat abc.txt` returns > > T h i s i s a b c f i l e > > Anyone know what might cause this? What do you mean by "[backtick] returns"? Can you paste a full example testcase? What is the file's encoding? If it's a unicode file with a UTF-16 encoding then you would ex

Re: Extra spaces in text files in cygwin

2008-06-10 Thread René Berber
gmarsha11 wrote: I am a brand new user of cygwin and I'm already having troubles. Whenever I grep or cat or otherwise dump the contents of a text file to stdout, there are extra spaces between all characters. For instance, if file abc.txt contains: This is abc file then, `cat abc.txt` return