HTML编码问题-出现“字符而不是” ;“
Private Shared Function ConvertToUTF8(ByVal html As String) As String Dim isoEncoding As Encoding = Encoding.GetEncoding("iso-8859-1") Dim source As Byte() = isoEncoding.GetBytes(html) Return Encoding.UTF8.GetString(Encoding.Convert(isoEncoding, Encoding.UTF8, source))End Function
编辑:
Private Shared Function ReplaceNonASCIIChars(ByVal html As String) As String Return Regex.Replace(html, "[^\u0000-\u007F]", " ")End Function
茅侃侃
手掌心
蝴蝶刀刀