Using the Server-Side Decode Function

The getXML subroutine calls the Decode function and passes the node value to the function. The Decode function loops through the node value and examines every character. When the string is Unicode encoded (you can identify Unicode encoding by the %u delimiters), the %u is skipped and the ChrW function returns a String containing the Unicode character. Using the ChrW function allows access to the full 65,536 Unicode character locations. When the string is not Unicode encoded the Chr function converts each group of two characters to their hexadecimal values.

If LCase(Mid(str,x+1,1)) = "u" Then
   Decode = Decode & ChrW(CLng("&H" & Mid(str,x+2,4)))
   str = Mid(str,x+6)
Else
   Decode = Decode & Chr(CLng("&H" & Mid(str,x+1,2)))
   str = Mid(str,x+3)
End If