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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



nayeem
New User

Apr 12, 2006, 8:27 AM

Post #1 of 1 (949 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
Next
Return hexString
End Function

So, can any one help to solve this problem.

Thanks to all.

Regards,

Nayeem.

 
 


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

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