Just starting out? Need help? Post your questions and find answers here.
RobertRioja
 
Posts: 31
Joined: Tue Jul 16, 2019 2:07 am
Location: USA

chr function prroblem

by RobertRioja Fri Feb 07, 2020 10:14 pm

According to the manual, chr(149) should display a dot. The description of the chr function points to an ASCII table which lists 149 as a dot. However, it seems that any number above 127 does not display anything when I use the SetGadgetText function.

Any ideas, or is this a bug?

Thanks,
Robert
swan
 
Posts: 19
Joined: Tue Dec 15, 2015 2:56 am

Re: chr function prroblem

by swan Fri Feb 07, 2020 11:24 pm

Try chr(46) or chr($2E)
RobertRioja
 
Posts: 31
Joined: Tue Jul 16, 2019 2:07 am
Location: USA

Re: chr function prroblem

by RobertRioja Sun Feb 09, 2020 3:53 am

Thank you for the reply, but that is not the problem. chr(46) displays a period, which is not the same as the character I am trying to display. The point is that it appears that the chr function only displays 0 to 127, and ignores everything else, regardless of what the documentation says.

Robert
hoerbie
 
Posts: 33
Joined: Sun Mar 17, 2019 5:51 pm

Re: chr function prroblem

by hoerbie Sun Feb 09, 2020 12:17 pm

Hi,
I think your problem is, that SpiderBasic produces UTF8 output send to the browser, and in UTF8 an Chr(149) is no simple/single sign.
If you want the html "bullet" listed in SB help at Ascii 149 you should try an Chr(8226). This is an error in the SB help, maybe simply copied from old PB.
Greetings, Hoerbie
swan
 
Posts: 19
Joined: Tue Dec 15, 2015 2:56 am

Re: chr function prroblem

by swan Sun Feb 09, 2020 10:14 pm

Note the character table (under tools) Ascii 149 is blank. Also check the font your using has that character.
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 2 guests