SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I have a problem with some German characters like ö,ä,ü and so on in my web part. SharePoint didn’t show these characters correctly. It just shows some crazy stuff like ö.

The Element.xml use <?xml version="1.0" encoding="utf-8"?>. The Sharepoint header uses <meta http-equiv="Content-Type" content="text/html; charset=utf-8">.

If I add a special character in the text field in SharePoint, the characters will show correctly. How could I fix this?

share|improve this question
up vote 0 down vote accepted

I think using the Unicode character set isn't enough, you'll need to change every special character with the corresponding html-code
Here's a list:
Special characters list

If you are reading the xml in c#, you could use the following to convert

string TestString = "This is a <Test String>.";
string EncodedString = HttpUtility.HtmlEncode(TestString);
//Output: This is a &lt;Test String&gt;.
share|improve this answer
Why i must change every special character? If i develop in php that is not necessary, if i use unicode. At the moment, the character is in asp ListItem, that is very time-consuming if i have to change every special character by myself. – hofmeister Oct 12 '11 at 11:55
Do you use Visual studio? Otherwise you can search and replace all characters with one click. But you'll need to that for every special character. Another way to change it inside the asp listitems is maybe with this (didn't test it) – Ruben Herman Oct 12 '11 at 12:11
Yes i uses VS. Okay, then i will change every character. I thought their would be a better solution. Thanks guys. – hofmeister Oct 13 '11 at 5:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.