[sf-perl] Printing TM trademark symbol in perl

Francisco Obispo fobispo at isc.org
Thu Feb 9 08:35:35 PST 2012


you need to check your encoding to make sure that they match, and if they don't set them properly.

LANG="en_US.UTF-8" 

or any other UNICODE-compatible encoding.

It is generally a bad idea to rely on it because it if clients don't understand UNICODE they will see whatever character correspond to their table… and believe me, it's even worse when the client doesn't support multi-byte characters (in general).

Francisco

On Feb 9, 2012, at 8:27 AM, Richard Reina wrote:

> Hi Franisco, Your suggestion as well as print chr('8482') works.  However, it only works on my Ununtu Machines that are running Xwindows.  When I try it on a Centos machines in console mode it prints the circled "r" for registered trademark.  Would anyone know why this is and how to get the TM to print on a Centos machine?
> 
> 
> 
> 2012/2/8 Francisco Obispo <fobispo at isc.org>
> Actually in UTF-8 its: 8482
> 
> 
> perl -e 'use Encode; map { printf(qq{char %d is: %s\n},$_,encode_utf8(chr($_)))} (8482)'
> 
> 
> http://www.fileformat.info/info/unicode/char/2122/index.htm
> 
> 
> 
> 
> 
> On Feb 8, 2012, at 6:42 PM, Francisco Obispo wrote:
> 
> > I was hoping it would show up in the table.
> >
> >
> >
> > On Feb 8, 2012, at 6:36 PM, Richard Reina wrote:
> >
> >> I don't know whether it is or not. I was hoping it was because I have to find a way to print it.
> >>
> >> 2012/2/8 Jeff Bragg <jackofnotrades at gmail.com>
> >> Is that actually in the ASCII set?  I see (in the output from a for loop printing the characters for ordinals 10 - 255) the circled 'r' (ord 174) and the copyright symbol (ord 169), but no trademark symbol.
> >>
> >> 2012/2/8 Richard Reina <gatorreina at gmail.com>
> >> I am needing to print the TM symbol for a trademark into a regular ascii text file and having no luck doing so.  Does anyone know how?
> >>
> >> Thanks for any help.
> >>
> >> _______________________________________________
> >> SanFrancisco-pm mailing list
> >> SanFrancisco-pm at pm.org
> >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
> >>
> >>
> >>
> >> _______________________________________________
> >> SanFrancisco-pm mailing list
> >> SanFrancisco-pm at pm.org
> >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
> >
> > _______________________________________________
> > SanFrancisco-pm mailing list
> > SanFrancisco-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
> 
> 



More information about the SanFrancisco-pm mailing list