×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    105

    Convert bytes to hexadecimal

    Hi,

    I have some bytes read from a file as follows.

    €…°…°…°€…°€…°€…

    how to convert these bytes to hexadecimal?

    Many thanks in advance.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Convert bytes to hexadecimal

    You could get the values with [] operator, like first byte from buffer called myBuf, you could get like this:

    TInt numNum= myBuf[0];

    And if you want to add it as an hex value to a buffer, just call Num, or AppendNum, and specify EHex with the function.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    105

    Re: Convert bytes to hexadecimal

    Thanks yucca.

    I tried this method, and I can get the hexa represeation. However, the hexa representation i retrieved doesnt seems to be correct as what it is suppose to be. Is there any conversion or anything else that need to be done?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Convert bytes to hexadecimal

    I don't see any need for any conversion in there. You should get the correct value from the buffer with the index really.

Similar Threads

  1. convert bytes to image object
    By Alpinet in forum Symbian
    Replies: 0
    Last Post: 2008-05-04, 20:11
  2. Convert bytes in String
    By decisor in forum Mobile Java General
    Replies: 8
    Last Post: 2006-08-03, 18:56
  3. Nokia 30 SMS sending problem !!!!!
    By pgredelj in forum General Messaging
    Replies: 1
    Last Post: 2004-01-12, 12:48

Posting Permissions

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