T
Tsu-na-mi
Hi,
I am having trouble getting a simple regexp to recognize the
registered trademark symbol (R) when it is read from XML. The XML
uses ® for the symbol, and if I print the string after parsing,
it prints correctly. However, the regexp:
$string =~ s/(R)/somethingelse/g;
does not recognize the (R) symbol. NOTE: (R) is the single-ASCII
character. I also tried using \x{AE} which did not work either. The
regular TM symbol doesn't work either, and seems to throw everything
into unicode mode, screwing up other stuff like the bullet and
copyright symbols.
So my question is, If I have XML like :
<P>This is my Widget®</P>
And read it into a string with XML:arser, how should I address this
character (and any char > 256 if you know).
For the record, I am using Perl 5.8.3 on Red Hat 9.0. Thanks for any
help anyone can provide.
I am having trouble getting a simple regexp to recognize the
registered trademark symbol (R) when it is read from XML. The XML
uses ® for the symbol, and if I print the string after parsing,
it prints correctly. However, the regexp:
$string =~ s/(R)/somethingelse/g;
does not recognize the (R) symbol. NOTE: (R) is the single-ASCII
character. I also tried using \x{AE} which did not work either. The
regular TM symbol doesn't work either, and seems to throw everything
into unicode mode, screwing up other stuff like the bullet and
copyright symbols.
So my question is, If I have XML like :
<P>This is my Widget®</P>
And read it into a string with XML:arser, how should I address this
character (and any char > 256 if you know).
For the record, I am using Perl 5.8.3 on Red Hat 9.0. Thanks for any
help anyone can provide.