One aspx page to have utf-8 encoding

后端 未结 2 1701
旧时难觅i
旧时难觅i 2021-01-03 03:54

What should I do to change one aspx page to have utf-8 encoding?

my web.config has the following code:


  

        
2条回答
  •  粉色の甜心
    2021-01-03 04:25

    Try this;

    
     
      
     
    
    

    To set the encoding for an individual page, set the RequestEncoding and ResponseEncoding attributes of the @ Page directive:

    <%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>
    

    Or you can use location like this:

    
        
            
        
    
    

    Read more: How to: Select an Encoding for ASP.NET Web Page Globalization.

提交回复
热议问题