Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unicode conversion

    hi

    i am new to programming can any 1 help me pls. with this bit of code to convert numbers to 4 digits unicode value:

    eg:

    var num = 1323

    this should be the result: 0031003300320033

    i.e : 1=0031, 3=0033, 2=0032, 3=0033 etc. for all the 0,9 digits.

    i tired using hex() but could not get the required result.

    thanks in advance.

  • #2
    New Coder
    Join Date
    Aug 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    take this:

    Code:
    Function unicode(n)
     for x = 1 to len(n)
      unicode = unicode & left(unicode &"00"& asc(mid(n,x,1)),4)
     next
    End Function
    Not tested, but should work.

    cheers


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •