CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Need help on registered symbol

 



junaid
New User

Sep 23, 2009, 4:41 AM

Post #1 of 4 (349 views)
Need help on registered symbol Can't Post

I am trying to replace the registered symbol - (R with a circle around it ) but not sure how to grep for it. The string containing the registered symbol is in a variable

But when i print the variable the registered symbol prints as << but these are not the left arrow keys two times

The output looks like
Microsoft« Windows Server« 2008 Enterprise


toolic
User

Sep 23, 2009, 7:16 AM

Post #2 of 4 (339 views)
Re: [junaid] Need help on registered symbol [In reply to] Can't Post

I just googled for the registered ascii code, and it seems
like it is hex 0xae. You can grep for it using a hex escape
code in a regular expression, for example:


Code
$str =~ s/\xae//g;   # delete all "registered" symbols



shawnhcorey
Enthusiast


Sep 23, 2009, 7:45 AM

Post #3 of 4 (329 views)
Re: [junaid] Need help on registered symbol [In reply to] Can't Post


In Reply To
I am trying to replace the registered symbol - (R with a circle around it ) but not sure how to grep for it. The string containing the registered symbol is in a variable

But when i print the variable the registered symbol prints as << but these are not the left arrow keys two times

The output looks like
Microsoft« Windows Server« 2008 Enterprise


Try:

Code
binmode STDOUT, ':utf8';


See `perldoc -f binmode` http://perldoc.perl.org/functions/binmode.html

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".


junaid
New User

Sep 23, 2009, 11:10 PM

Post #4 of 4 (317 views)
Re: [toolic] Need help on registered symbol [In reply to] Can't Post

thanks for the help it worked

I can go ahead and put a registered mark for working lolz w with a circle around it

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives