In earlier Delphi versions, I could use
s:=chr(153);
to get a trademark symbol in a string. In Delphi 2010, that doesn't work any longer, perhaps to do with unicode. What is the equivalent code string to put the TM symbol into my string?
In D2010, I can do this:
s := '™' + chr(8482) + #8482; // yields 3 subsequent TM symbols
Result: ™™™
Here's a good article, by Joel himself - I re-read it just today, in fact.
http://www.joelonsoftware.com/articles/Unicode.html
I'm pretty sure that chr(153)
is "Ö" (Code page 437), oh wait, it is "r" (EBCDIC 037).
Actually chr(153)
is undefined unless you also specify the code page you are using.
Which is exactly the reason you should use Unicode.
Wikipedia has pages for most Unicode symbols, and includes the Unicode codepoint for them.
There is the plain trademark symbol having unicode codepoint U+2122 (Delphi: Chr($2122)
or #$2122
).
There is also the registered trademark symbol having unicode codepoint U+00AE (Delphi: Chr($00AE)
or #$00AE
).
The unicode site has a list of charts where you can find all symbols, but it takes time getting used how to find them (as the number of charts is a bit large).
The plain trademark symbol is part of the letterlike symbols.
The registered trademark symbol is part of the latin-1 supplement.
--jeroen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With