Topic: Copyright symbol?


Using SF v2.0, I was able to insert both Copyright and Trademark symbols in a message box (e.g., "BestCurvFit™ Copyright © 2021 myname).  But using SF v3, these text symbols are not recognized.  How can symbols such as © and ™ be added using SF v3.18?   Or is it no longer possible?


Re: Copyright symbol?


Actually the issue is not with the message box but with Appgraphics Call outtextxy(,cText) routine.

I tried two examples and neither of them was able to display the correct symbols.

cTxt = "BestCurvFit™ Copyright © 2021 myname"

cTxt = "BestCurvFit"//Achar(153)//"Copyright"//Achar(169)//"2021 myname"

call outtextxy( (w, h, TRIM(cTxt) )

Since the problem is Appgraphics specific, there may not be an easy fix.  I may have to just resort to (TM) and (C) in place of the symbols.


Re: Copyright symbol?


In version 3.18, we switched to true UTF-8 output for outtext and outtextxy calls.  Your original code was using the extended ANSI character set, but you'll need to start using UTF-8 codes instead.  While this is problematic for things like the copyright and trademark symbols, it opens up a world of other characters.

For the copyright symbol, you would need to use a two-character combination to create the symbol.  If you consult a Unicode reference, you'll see that you need to use the character code 0xc2 0xa9 (or 194 169).  Your code will work if you change the call to:

cTxt = "BestCurvFit"//char(226)//char(132)//char(162)//"Copyright"//char(194)//char(169)//"2021 myname"

Note that the trademark symbol requires three characters.

Jeff Armstrong
Approximatrix, LLC