2017-10-16 3 views

답변

0
Function Unicode2Html(strText As String) As String 

Dim i As Integer 
Dim strOut As String 
Dim char As String 
Dim intCharCode As Integer 

For i = 1 To Len(strText) 
    char = Mid(strText, i, 1) 
    intCharCode = AscW(char) 
    If intCharCode > 127 Then 
     strOut = strOut & "&#" & intCharCode & ";" 
    Else 
     strOut = strOut & char 
    End If 
Next 

Unicode2Html = strOut 

End Function 
관련 문제