views:

33

answers:

2

Hi,

I'm getting these little diamonds with question marks in them in my HTML attributes when I present data from my database. I'm using EPiServer and a few custom properties.

This is the information I've gathered,

  • I save my data as a XML document, since I use custom EPiServer properties which need more than one defined value. This is saved as UTF8.

  • It's only attributes in element tags which have this problem, such as align=left becomes align=�left�. There is no " character there, but I get the diamonds anyway.

  • If I use " outside an element, it works and shows correctly.

Any clues?

+1  A: 

This is a problem with your character encoding scheme.

I would recommend reading this article, where (close to the bottom of it), he shows you why you get that little diamond with question marks.

Dave Markle
yes, I've thought of this, although the text is stored like <a href="url" class=arrow>foo</a>and the quotation marks for the href attribute is shown correctly, and it is only around the arrow class that the diamond is shown, it just magically appears!
hokkaido
You are going to have to find a way and see what characters those are to understand the root cause. James Anderson has a good idea...
Dave Markle
+1  A: 

Has the XML been touched by any of the Microsoft Office suite products.

These are notorius for switching vanilla quotes (") x'22' to smartquotes x'93' and x'94'(“”).

Also singlequote (') is often converted from x'27' to x'91' and x'92' pairs (‘’).

James Anderson