p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   Classic ASP XML (http://p2p.wrox.com/classic-asp-xml-69/)
-   -   How to convert ascii string to utf-8 (http://p2p.wrox.com/classic-asp-xml/89505-how-convert-ascii-string-utf-8-a.html)

yoglius March 7th, 2013 07:20 AM

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:

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)
  AsciiToUTF8 = bytDest
End Function

thanx in advanced

All times are GMT -4. The time now is 09:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.