How to print a "non-ascii" character inside a Perl Script
How to print non ascii characters in a perl script ?
For ex. I want to print the "copyright" symbol ( a 'c' inside a circle)
as the output of a perl programme.
Is there any way I can do that?
- If you are outputting to HTML (ie. a web browser), then use a list like:
The code for copyright is ©
However, if you are using it in another context, you are dependent on the ascii table your machine is using (and therefore your code may not be portable to another machine, or even in some case, another user). Check into the chr() function.
On my system chr(169) prints the copyright symbol to the screen, others it may be different.
< >-< >< >-< >< >-< >< >-< >< >-< >< >-< >< >-< >< >-< >< >
| | | GREG WEBSTER - greg@... | | | |