I am storing pieces of XHTML as text on a search index. Once the user submits a search request, I insert this text in my page and return it to the server. This all works fine except when there is a ISO 8859-1 Symbol in the text (such as a copyright symbol ©). The symbol is not represented correctly in the browser, it is displayed as the entity number (© for the copyright symbol ©) and is not displayed as the symbol.
If I copy and paste the XHTML into a static web page and look at it in the browser, the symbol is rendered correctly.
When I do view source, I see the same text string under both conditions mentioned above.
Can you please tell me what is going on, and how do I fix it.
I am using ASP.NET MVC 2 and using the following code to add the XHTML inside an .ascx page where my Model is a collection o strings, each holding a piece of XHTML:
<%foreach(string s in ViewData.Model) {%>
<%= s %>
<%} %>
<%
Thanks for your help!
CoderGeek