views:

44

answers:

1

Hi, i have a problem i am developing an asp.net mvc project. Website is in Turkish Language. When i publish this website to IIS Turkish characters get crazy in web pages so i set globalization in my web.config as

<globalization fileEncoding="iso-8859-9" requestEncoding="iso-8859-9" responseEncoding="iso-8859-9"/>

After this Turkish characters shown correct.

But now i have another problem when i enter Turkish text to an input text and then POST to my controller action, Turkish characters get crazy again.

I tracked the http messages Turkish text POST correctly ex: If i enter "Yücel" (ü is Turkish character) to input, i looked to HttpAnalyzer i can see that Post Data is "Yücel". When i look to my action's parameter's properties which are binded automatically by MVC, I see "Yücel".

Is there any suggestion from you to fix this problem?

+1  A: 

I fixed the problem, what i did is,

  1. Delete following element from web.config so default encoding (UTF-8) will be used

globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

  1. Delete following from my Site.Master

meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"/>

Note: sorry i cant add "<" to the begin of codes

Yucel