ASCII Characters

2002-12-19 Thread Paul Kraus
My UNIX system prints these print commands to printer to set font as well as page breaks ect... I need to be able to add them to my reports but just inserting them doesn't do the trick so I am guessing I need the actual ASCII codes to do it. Here is the text the would print if I redirected the rep

non-ascii characters?

2005-10-14 Thread Charles Farinella
Does anyone know how I can search for non-ascii characters in a text file? --charlie -- Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) [EMAIL PROTECTED] 603.924.6079 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: ASCII Characters

2002-12-19 Thread Paul Kraus
Ignore. I just found my answer in the removing line feeds thread. > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 19, 2002 8:25 AM > To: 'Perl' > Subject: ASCII Characters > > > My UNIX system prints thes

Re: ASCII Characters

2002-12-19 Thread Rob Dixon
Hi Paul. These are ANSI escape sequences, with the square as the ASCII escape character 0x1B. This is control-[, so you can code these strings in Perl as "\c[[120;72 G" etc. HTH, Rob "Paul Kraus" <[EMAIL PROTECTED]> wrote in message 013101c2a762$06dc2700$64fea8c0@pkrausxp">news:013101c2a762$06

RE: ASCII Characters

2002-12-19 Thread Paul Kraus
Thanks. I spoke to soon. The answer I found in the line feed thread. Didn't work for this. But \c[ worked like a charm. > -Original Message- > From: Rob Dixon [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 19, 2002 8:40 AM > To: [EMAIL PROTECTED] > Subject:

Re: ASCII Characters

2002-12-19 Thread John W. Krahn
Paul Kraus wrote: > > My UNIX system prints these print commands to printer to set font as > well as page breaks ect... I need to be able to add them to my reports > but just inserting them doesn't do the trick so I am guessing I need the > actual ASCII codes to do it. > > Here is the text the wo

Re: ASCII Characters

2002-12-19 Thread Rob Dixon
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Paul Kraus wrote: > > print "\e[120;72 G\e[120;43 G" > Of course. Thanks John. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: non-ascii characters?

2005-10-14 Thread Jeff 'japhy' Pinyan
On Oct 14, Charles Farinella said: Does anyone know how I can search for non-ascii characters in a text file? By non-ASCII, do you mean characters high-bit ASCII or Unicode? -- Jeff "japhy" Pinyan% How can we ever be the sold short or RPI Acacia Brother #734% the c

Re: non-ascii characters?

2005-10-14 Thread Charles Farinella
On Fri, 2005-10-14 at 15:34, Jeff 'japhy' Pinyan wrote: > On Oct 14, Charles Farinella said: > > > Does anyone know how I can search for non-ascii characters in a text > > file? > > By non-ASCII, do you mean characters high-bit ASCII or Unicode? h,

parse out HEX / ASCII characters

2003-04-02 Thread Johnson, Shaunn
Howdy: Is there a way to parse out characters that somehow wind up in an ASCII file. For examples, I have data that appears to have those wingding characters further down. I don't know all of what's in there, but I can not use the file unless I get rid of them. How do you identify them and rem

removing ASCII characters from array

2001-06-25 Thread Alex Nelson
I wrote a simple Perl script that removes a line from a file then writes it to another file. The result that is printed to the other file is: Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239 The last three elements are written from an array. What I would like to do is only print the numbers

RE: removing ASCII characters from array

2001-06-25 Thread John Edwards
$data = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239"; @array = $data =~ /=(\d*)/g; print "$array[0], $array[1], $array[2]\n"; -Original Message- From: Alex Nelson [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 17:07 To: [EMAIL PROTECTED] Subject: removing A

Re: removing ASCII characters from array

2001-06-25 Thread Jos Boumans
nal Message- > From: Alex Nelson [mailto:[EMAIL PROTECTED]] > Sent: 25 June 2001 17:07 > To: [EMAIL PROTECTED] > Subject: removing ASCII characters from array > > I wrote a simple Perl script that removes a line from a file then writes it > to another file. The result that is

Re: removing ASCII characters from array

2001-06-25 Thread Me
> > $data = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239"; > > > > @array = $data =~ /=(\d*)/g; > > > > print "$array[0], $array[1], $array[2]\n"; > and for esthetics: > > print join ',' @array; > > timtowtdi =) Or $_ = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239";

Re: removing ASCII characters from array

2001-06-25 Thread Jos I. Boumans
PROTECTED]> To: "Jos Boumans" <[EMAIL PROTECTED]>; "John Edwards" <[EMAIL PROTECTED]> Cc: "'Alex Nelson'" <[EMAIL PROTECTED]>; "Perl Beginners (E-mail)" <[EMAIL PROTECTED]> Sent: Tuesday, June 26, 2001 12:16 AM Subj

Re: removing ASCII characters from array

2001-06-25 Thread Me
> But that wasnt the question man =) > you print '230107312001,32,192,239' > > but the question was to just have: '32,192,239' > > -10 cookie points! ;-) Oops, being careless. You could throw away .*?= first: $_ = "Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239"; s/.*?=//g;#

Re: removing ASCII characters from array

2001-06-25 Thread Me
> s/.*?=//g;# remove leading junk should of course be > s/.*?=//;# remove leading junk Ok, ok, I accept another -10 points. :< ;>

regexps with multiple matches and extended ASCII characters

2002-01-04 Thread Birgit Kellner
use strict; my $string = "!Rita 1983! and then some text and here is !Künne 1234! and !Kußmaul 2001!"; while ($string =~ /!(\w+)\s(\d{4})!/gi) { print "$1 and $2\n";} # prints "Rita and 1983" while ($string =~ /!(\C+)\s(\d{4})!/gi) { print "$1 and $2\n";} # prints "Rita 1983! and then some text an

parsing CSV files with control and extended ASCII characters

2008-03-20 Thread David Newman
I have some CSV input files that contain control and extended ASCII characters, including: - vertical tabs (0x0B) - acute and grave accents - tildes - circumflexes - umlauts - nonbreaking spaces (0xA0) The Text::CSV or Tie::Handle::CSV modules don't like these characters; the sni

recursively find and print non-ascii characters in file

2009-01-07 Thread Anže Vidmar
of the files containing it. So far, I found a script that looks into a file for non-ascii characters and prints this characters in hex: while (<>) { s/([\x80-\xff])/sprintf "\\x{%02x}",ord($1)/eg; print; } Ok, this is good, the non-ascii character (in hex) that I&#x

Re: regexps with multiple matches and extended ASCII characters

2002-01-04 Thread Jeff 'japhy' Pinyan
On Jan 4, Birgit Kellner said: >my $string = "!Rita 1983! and then some text and here is !Künne 1234! >and !Kußmaul 2001!"; >while ($string =~ /!(\w+)\s(\d{4})!/gi) { print "$1 and $2\n";} ># prints "Rita and 1983" >while ($string =~ /!(\C+)\s(\d{4})!/gi) { print "$1 and $2\n";} ># prints "Rita 1

Re: parsing CSV files with control and extended ASCII characters

2008-03-20 Thread Gunnar Hjalmarsson
David Newman wrote: I have some CSV input files that contain control and extended ASCII characters, The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets below both return errors when they get to one. my $csv = Text::CSV->new(); In the docs for T

Re: parsing CSV files with control and extended ASCII characters

2008-05-06 Thread David Newman
On 3/20/08 5:05 PM, Gunnar Hjalmarsson wrote: David Newman wrote: I have some CSV input files that contain control and extended ASCII characters, The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets below both return errors when they get to one. my

Re: parsing CSV files with control and extended ASCII characters

2008-05-06 Thread Gunnar Hjalmarsson
David Newman wrote: On 3/20/08 5:05 PM, Gunnar Hjalmarsson wrote: David Newman wrote: I have some CSV input files that contain control and extended ASCII characters, The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets below both return errors when the

Re: parsing CSV files with control and extended ASCII characters

2008-05-06 Thread Jenda Krynicky
s between 0x20 and 0x7e. I also see there is a binary mode for > any character, but the documentation does not describe whether the > module parses binary-mode characters the same way as ASCII characters. > > This seems like a fairly standard problem. What's the "right&quo

Re: recursively find and print non-ascii characters in file

2009-01-07 Thread Chas. Owens
racter > in the file. And most importantly - i need to know the name of the files > containing it. > > So far, I found a script that looks into a file for non-ascii characters and > prints this characters in hex: > > while (<>) { >s/([\x80-\xff])/sprintf "\\x{

Re: recursively find and print non-ascii characters in file

2009-01-07 Thread Rob Dixon
tantly - i need to know the name > of the files containing it. > > So far, I found a script that looks into a file for non-ascii > characters and prints this characters in hex: > > while (<>) { > s/([\x80-\xff])/sprintf "\\x{%02x}",ord($1)/eg; &g

Re: recursively find and print non-ascii characters in file

2009-01-07 Thread Rob Dixon
iles that contains a specific non-ascii character >> in the file. And most importantly - i need to know the name of the files >> containing it. >> >> So far, I found a script that looks into a file for non-ascii characters and >> prints this characters in hex: >>

Re: recursively find and print non-ascii characters in file

2009-01-08 Thread Mike McClain
On Thu, Jan 08, 2009 at 01:52:02AM +, Rob Dixon wrote: > Chas. Owens wrote: > > File::Find::find( > > File::Find exports find() by default. It is better either to use the import or > to prevent it altogether with > > use File::Find (); > > in the first place. > > Rob In what way is it be

Re: recursively find and print non-ascii characters in file

2009-01-08 Thread Chas. Owens
On Thu, Jan 8, 2009 at 14:10, Mike McClain wrote: > On Thu, Jan 08, 2009 at 01:52:02AM +, Rob Dixon wrote: >> Chas. Owens wrote: >> > File::Find::find( >> >> File::Find exports find() by default. It is better either to use the import >> or >> to prevent it altogether with >> >> use File::Fi

How to test for existence of file with non-ascii characters

2018-12-26 Thread Mike Martin
Any ideas how to test for the existance of a file, when the file name contains extended ascii characters For example if the file contains emdash (U-2014) file -e always returns false thanks Mike

Re: How to test for existence of file with non-ascii characters

2018-12-26 Thread Jesús Ruiz
w to test for the existance of a file, when the file name > contains extended ascii characters > > For example if the file contains emdash (U-2014) file -e always returns > false > > thanks > > Mike -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How to test for existence of file with non-ascii characters

2018-12-26 Thread Uri Guttman
On 12/26/18 7:31 AM, Mike Martin wrote: Any ideas how to test for the existance of a file, when the file name contains extended ascii characters For example if the file contains emdash (U-2014) file -e always returns false -e should not be looking at the filename directly. it checks if

Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread Roman Daszczyszak
Hello all, I am using a script to parse a CSV file with approximately 65,000 records. Some of these records contain characters such as é, ì, etc. I can read and write lines containing these characters via a file handle, however when I try and parse the line using the module Class::CSV, it fails

Need help with error from certain ASCII characters in a CSV file

2006-07-07 Thread Xavier Mas i Ramón
Did you try to replace these characters of the file by they Unicode code (that Perl coulf read)? -- Xavier Mas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread Xavier Noria
On Jul 6, 2006, at 10:41, Roman Daszczyszak wrote: Does anyone have a suggestion for how I can handle this, or even where I can look to solve this issue? Is there another possibility for where the error is occurring that I am not seeing? I would create the filehandle specifying the character

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread Owen Cook
On Thu, 6 Jul 2006, Roman Daszczyszak wrote: > Hello all, > > I am using a script to parse a CSV file with approximately 65,000 > records. Some of these records contain characters such as é, ì, etc. > I can read and write lines containing these characters via a file > handle, however when I try

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread John W. Krahn
Roman Daszczyszak wrote: > Hello all, Hello, > I am using a script to parse a CSV file with approximately 65,000 > records. Some of these records contain characters such as é, ì, etc. > I can read and write lines containing these characters via a file > handle, however when I try and parse the l

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread Mumia W.
Roman Daszczyszak wrote: Hello all, I am using a script to parse a CSV file with approximately 65,000 records. Some of these records contain characters such as é, ì, etc. I can read and write lines containing these characters via a file handle, however when I try and parse the line using the mo

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-09 Thread Dr.Ruud
"Roman Daszczyszak" schreef: > #!\perl\perl.exe Does that do anything useful? Maybe change to just #!perl > my @lines = @{$csv_file->lines()}; > shift @lines; # Strips off the header line before processing Variant: (undef, @my lines) = @{$csv_file->lines()} ; -- Affijn, Ruud "Gewoon is e

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-09 Thread Mr. Shawn H. Corey
Dr.Ruud wrote: > "Roman Daszczyszak" schreef: > > >>#!\perl\perl.exe > > > Does that do anything useful? Maybe change to just > #!perl > How about: #!/perl/bin/perl On MS Windows, perl is usually 'C:\PERL\BIN\PERL.EXE'. You would not need the '.exe' and I'm quite sure you need a 'bin' somewhe

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-09 Thread Dr.Ruud
"Mumia W." schreef: > Roman Daszczyszak: >> I am using a script to parse a CSV file with approximately 65,000 >> records. Some of these records contain characters such as é, ì, etc. >> I can read and write lines containing these characters via a file >> handle, however when I try and parse the li

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-09 Thread Mr. Shawn H. Corey
Dr.Ruud wrote: > That changes the encoding of the script, and of STDIN and STDOUT, but > not of any open()s, so it might not be enough. You can open with encoding with the three-argument form. For example: open(FH, "<:utf8", "file") See `perldoc -f open` for details. Also, after an open, you c