Display Non English Character In Textbox
i want to display some non english characters in a textbox. i am trying with $('#txtSearch').val('<%:Html.Raw(ViewBag.my_search)%>') It should display '2100 - København Ø'
Solution 1:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
is not a good way to set your page's encoding because it is overriden by the real http header. So if the remote hosting provider is sending a content-type header, it will be ignored.
Your data is correctly utf-8, so that's good. All you need do is set the content-type http header, so that the browser will read it as utf-8 and not windows-1252.
You can set your individual page to send the header with:
<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>
Or you can set it in Web.config globally:
<configuration><system.web><globalizationrequestEncoding="utf-8"responseEncoding="utf-8" /></system.web></configuration>
Post a Comment for "Display Non English Character In Textbox"