delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/13/02:45:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 13 Jan 2003 02:44:25 -0500
From: Jon LaBadie <jcyg AT jgcomp DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Unicode files
Message-ID: <20030113074424.GB18104@butch.jgcomp.com>
References: <F1B91355CC52D3119412004F4E0286AF78E309 AT msx1 DOT link DOT domnet DOT com DOT au> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030112210002 DOT 02720e50 AT pop3 DOT cris DOT com>
Mime-Version: 1.0
In-Reply-To: <5.2.0.9.2.20030112210002.02720e50@pop3.cris.com>
User-Agent: Mutt/1.3.28i

At 21:18 2003-01-12, Clancy Malcolm wrote:
>Can cygwin programs like grep process a unicode file?
>
>I have a Windows 2000 backup log file which seems to be a unicode file.
>When I cat the file under cygwin it displays with spaces between every
>second character: e.g.
>
>ÿ_B a c k u p   S t a t u s
> O p e r a t i o n :   B a c k u p
> A c t i v e   b a c k u p   d e s t i n a t i o n :   4 m m   D D S
> M e d i a   n a m e :   " T S C 4 - 2 0 0 3 - 0 1 - 1 3 - 2 - 3 5 p "
>
>When I cat in under linux it displays as a normal text file.  I have a
>script which grep's for particular patterns and emails matching lines, but
>it won't work with these log files.
>
>Any suggestions greatly appreciated.

For the ntbtlog.txt file I found this worked as a conversion tool for me.

	tr -d '\0\r' < InputFile > OutputFile

But that is the only unicode file I've had to deal with.

-- 
Jon H. LaBadie                  jcyg AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019