CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
Need help to convert text


New User

Apr 12, 2006, 8:27 AM

Post #1 of 1 (956 views)
Need help to convert text Can't Post

Dear All,

Presently I'm using VB.Net application to send sms via http but I'm facing many problems so I decide to use perl but I'm facing difficulties to convert the Text which VB functions are doing, well VB Function code is mention below

Public Function EncodeArabic(ByVal arabicString As String) As String
Dim _targetEncoding As System.Text.Encoding
Dim _encodedCharsArray() As Byte
Dim _resultString As String = String.Empty
'1256 is the code page for windows arabic

' 1201 is the code page of Unicode big endian
_targetEncoding = System.Text.Encoding.GetEncoding(1201)
_encodedCharsArray = _targetEncoding.GetBytes(arabicString)
'_resultString = ByteToHexadecimal(_encodedCharsArray)
_resultString = ByteToHexadecimal(_encodedCharsArray)
Return _resultString
End Function

Public Function ByteToHexadecimal(ByVal imageByteArray() As Byte) As String
Dim hexString As String = String.Empty
Dim i As Integer
For i = 0 To imageByteArray.Length - 1 Step i + 1
hexString += imageByteArray(i).ToString("x2") 'it was X2
Return hexString
End Function

So, can any one help to solve this problem.

Thanks to all.




Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives