I serve an XML feed to a number of web sites and this morning a webmaster brought to my attention the fact that special characters such as the trademark (™) character comes out as a question mark through the feed.
I can see the TM character OK when I view the database fields directly, but not in the feed. I'm using encoding="ISO-8859-1", does that have something to do with it?
irnbru
2:13 pm on Apr 26, 2005 (gmt 0)
Probably.
FWICS TM is entity ™ which puts it outside of ISO-8859-1
Its likely that the locale of your database is UTF-8 and therefore so should your feed.
rexrhino
3:12 pm on Apr 26, 2005 (gmt 0)
Depending on how you are using the XML, you could also do a superscript of the letters TM. There are cases where this is preferable (for example, if you do several languages and one of the languages doesn't use the word "Trademark").
dataguy
3:34 pm on Apr 26, 2005 (gmt 0)
Apparently ISO-8859-1 does not handle the trademark symbol, and I am stuck with using ISO-8859-1. I've had to create some encodeing of my own, which seems to be working fine. I'm replacing the TM symbol with '[TM}', sending it as ISO-8859-1, and then changing it back to the symbol on the client end.