View Single Post
  #1 (permalink)  
Old March 7th, 2013, 07:20 AM
yoglius yoglius is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to convert ascii string to utf-8

hi all,
im built XML with XMLDOM.
when i try to get a response from the server side i've got an error about the Hebrew part in the XML FILE.

i've a vb function that running well on VB6.
my Question is how can i make that FUNCTION to run in classic asp.

here is the funcion:
Code:
Public Function AsciiToUTF8(InputStr As String) As Byte()
Dim bytSrc() As Byte
Dim bytDest() As Byte
Dim i As Long

   bytSrc = InputStr
   ReDim bytDest(UBound(bytSrc) \ 2)
   For i = 0 To UBound(bytDest)
      bytDest(i) = bytSrc(i * 2)
   Next
   
   AsciiToUTF8 = bytDest
End Function

thanx in advanced
Reply With Quote