p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP XML (http://p2p.wrox.com/forumdisplay.php?f=69)
-   -   How to convert ascii string to utf-8 (http://p2p.wrox.com/showthread.php?t=89505)

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 03:21 PM.

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