Special Character Replacement
-
I have RSS feeds displaying on an asp web page. One problem, it is displaying supposedly quotation marks but instead it is displaying a square. I checked in source and saw that it was a question mark. When I tried doing a InStr() and searching for either a quotation mark or a question, I didn't get anything back. Has anyone ever come accross this issue before in ASP?
-
I have RSS feeds displaying on an asp web page. One problem, it is displaying supposedly quotation marks but instead it is displaying a square. I checked in source and saw that it was a question mark. When I tried doing a InStr() and searching for either a quotation mark or a question, I didn't get anything back. Has anyone ever come accross this issue before in ASP?
It sounds like you have a problem with encoding. If the RSS feed is encoded using a specific character set, you have display it using the same character set. The quotation marks in your RSS is probably not the regular inch sign (") that is usually used as a quotation mark, but typographic quotation marks. They are not in the lower 128 characters (ASCII equivalent) of the character set, so if you mess upp the encoding, their character code might not correspond to any character in the character set used. Those are usually displayed as squares. When decoded to unicode using the wrong encoding, they will be converted to question marks. As RSS is XML, my first guess would be UTF-8 encoding. Check the source of the XML to see if it specifies any encoding.
--- Year happy = new Year(2007);