Answer the question
In order to leave comments, you need to log in
ASP.net MVC - accept POST not in UTF-8?
My application uses UTF-8 everywhere and I don't want to change that. But: the old web gateway sends me a POST with text in the Windows1251 format. What is the easiest way to change the encoding of a single action of a single controller to Windows1251?
public class Message<br/>
{<br/>
public int id { get; set; }<br/>
public string phone { get; set; }<br/>
public string mes { get; set; }<br/>
public string to { get; set; }<br/>
}<br/>
<br/>
[HttpPost]<br/>
public ActionResult Receive(Message msg)<br/>
{<br/>
AddIncomingMessage(msg);<br/>
return new EmptyResult();<br/>
}<br/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question