Re: dealing with non-ascii characters in perl

2002-04-04 Thread Peter Beardsley
At 04:52 PM 4/3/2002 -0500, John Abreau wrote: In the first, you're using regular ascii characters, i.e. the 3-digit decimal value of the non-ascii character's ordinal value. In the second you're using the character itself. OK, now I understand, thanks to everybody for their help. Peter

dealing with non-ascii characters in perl

2002-04-03 Thread Peter Beardsley
I'm dealing with import data from a Mac that has non-ascii apostrophes that are hex d5. I wrote a regular expression in perl to replace them: my $hex = 0xd5; $str =~ s/$hex/\'/g; OK, now if I make a string in perl with this character in it like so: my $str = 'foo'

Re: dealing with non-ascii characters in perl

2002-04-03 Thread John Abreau
Peter Beardsley [EMAIL PROTECTED] writes: One thing I noticed was when I had perl print the values, the string I made in perl printed like so: foo213s string While the one from the input file looked like this: fooÕs string In the first, you're using regular ascii

ASCII trivia (was: dealing with non-ascii characters in perl

2002-04-03 Thread Jack Hodgson
I'm dealing with import data from a Mac that has non-ascii apostrophes that are hex d5. Aren't ASCII characters numbered from 0 to 255? Or does ASCII just go up to 127? -- Jack Hodgson [EMAIL PROTECTED] www.jackhodgson.com * To

Re: dealing with non-ascii characters in perl

2002-04-03 Thread Derek D. Martin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 At some point hitherto, Peter Beardsley hath spake thusly: I'm dealing with import data from a Mac that has non-ascii apostrophes that are hex d5. I wrote a regular expression in perl to replace them: my $hex = 0xd5; $str =~

Re: dealing with non-ascii characters in perl

2002-04-03 Thread Kevin D. Clark
Peter Beardsley [EMAIL PROTECTED] writes: I'm dealing with import data from a Mac that has non-ascii apostrophes that are hex d5. I wrote a regular expression in perl to replace them: my $hex = 0xd5; $str =~ s/$hex/\'/g; OK, now if I make a string in perl with this