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
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'
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
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
-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 =~
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