Teodoris
Teodoris

Reputation: 291

How can I fix character encoding MVC3?

Hello everyone I have added a search engine on my project but when I click the search button some characters are going crazy like ş seems ÅŸ. After that I have added the code as you can see below at Shared cshtml ;

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

Finally I have added this to webconfig file

<system.web>
    <globalization culture="tr-TR" uiCulture="tr-TR" fileEncoding="utf-8" 
                   responseEncoding="utf-8" requestEncoding="utf-8" />

But nothing was changed. Could you help me please ?

Here is my search code

<form method="get" action="http://www.google.com.tr/custom" target="google_window">

    <input type="hidden" name="domains" value="www.maltepe.bel.tr"></input>
    <label for="sbi" style="display: none"></label>
    <input type="text" name="q" style="height:14px;width:167px" value="" id="sbi"></input>
    <button type="submit" name="sa" value="Arama" id="sbb"></button>
    <input type="hidden" name="sitesearch" value="www.maltepe.bel.tr" id="ss1"></input>
    <input type="hidden" name="client" value="pub-2231511596197409"></input>
    <input type="hidden" name="forid" value="1"></input>
    <input type="hidden" name="channel" value="1809328852"></input>
    <input type="hidden" name="ie" value="ISO-8859-9"></input>
    <input type="hidden" name="oe" value="ISO-8859-9"></input>
    <input type="hidden" name="cof" value="GALT:#E9382F;GL:1;DIV:#CCCCCC;VLC:7E3939;AH:center;BGC:FFFFFF;LBGC:FF3333;ALC:E9382F;LC:E9382F;T:000000;GFNT:7E3939;GIMP:7E3939;FORID:1"></input>
    <input type="hidden" name="hl" value="tr"></input>

</form>

Upvotes: 0

Views: 348

Answers (1)

Khue Vu
Khue Vu

Reputation: 3142

Try to change ie and oe value to "UTF-8" see if it is ok.

Upvotes: 1

Related Questions