Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

very stupid question..

Status
Not open for further replies.

crackn101

Programmer
Dec 27, 2002
63
US
I am using Perl Builder 2.0 IDE, and activestate perl.
when i try to use the chr function to generate line
characters, i do not get the character i need.
For example the line char 186 should be the double line
verticle element, but instead gives me this : º
looks like the extended character for ascii code 167.
Not sure what gives here. Tried it on 2 different computers with the same results.
Code sample:

$tr = chr(186);
print "186 = $tr";

I even tried to use the sprintf for the character
conversion with the same results.
The produced character simply does not match the supplied
ascii scan code. Only seems to affect the extended codes that are 128 and above.
Is this a bug with activestate perl ??
I know this is a stupid question, so i appologize in advance.
Thanks.

 
That's true. Didn't think about the system font that was being used. See i warned ya that it was a stupid question. hehe
take care.
 
ASCII itself is only a 7-bit code, right? So it's only official for character codes 0-127.

________________________________________
Andrew

I work for a gift card company!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top