Hi,
Thanks for the help. I printed the chars, $a, and $b before and after removing the 0x00 chars but they seem to be the same. And the test fails.


What is strange is that the reverse of the test passes ($b =~ m/[$a]/i;)

Any other thoughts/ ideas on why this might be happening ?

Thanks,
Rajarshi.


From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, <beginners@perl.org>
Subject: RE: z/OS unicode problem.
Date: Thu, 3 Mar 2005 10:29:22 +0530


Hi,

May be this is could be useful; Unicode characters have two bytes for
each character. Each character has "0x00" following to the each
character. You need to remove the "0x00" after each character and then
do the Regular Expression matching.

my $temp = chr(0x00);
$line =~ s/$temp//g; this remove the Unicode characters from the line.

Regds
Suresh

-----Original Message-----
From: Rajarshi Das [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 03, 2005 5:33 AM
To: beginners@perl.org
Subject: z/OS unicode problem.

Hi,
I had a question regarding utf-ebcdic issues on z/OS. I tried this on a
perl-5.8.6.  If I use a unicode character within a character class and
try
matching the same using a regular expression, I get a failure.

e.g. if I write this ;

use charnames:full;

$a = "\N{LATIN SMALL LETTER A WITH GRAVE}";
$b = "\N{LATIN CAPITAL LETTER A WITH GRAVE}";

$a =~ m/[$b]/i;

This fails whereas,

$b =~ m/[$a]/i;
passes.

Does anyone have thoughts on why this might be happening ? Alternately,
could someone let know as to who could help ?

Thanks in advance,
Rajarshi.

_________________________________________________________________
Click, Upload, Print. http://www.kodakexpress.co.in?soe=4956 Deliver in
India.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>



Confidentiality Notice
The information contained in this electronic
message and any attachments to this message are
intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information.
If you are not the intended recipient, please notify
the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

_________________________________________________________________
Apply to over 75,000 jobs now. http://www.naukri.com/tieups/tieups.php?othersrcp=736 Post your CV on naukri.com today.



-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to