[ASP.NET] 繁簡直接轉換
繁轉簡
''' ''' 覆寫 Render 方法做繁轉簡的動作。 ''' Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter) Dim HtmlStr As String Dim oStringWriter As New StringWriter() Dim oHtmlWriter As New HtmlTextWriter(oStringWriter) MyBase.Render(oHtmlWriter) oHtmlWriter.Flush() oHtmlWriter.Close() '取得網頁的輸出內容做繁體中文轉簡體中文的動作 HtmlStr = StrConv(oStringWriter.ToString(), VbStrConv.SimplifiedChinese, 2052) Response.Write(HtmlStr) End Sub簡轉繁 VbStrConv.TraditionalChinese, 2052
留言
張貼留言