Results 1 to 8 of 8

Thread: [RESOLVED] Help Decoding a character é

  1. #1

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Resolved [RESOLVED] Help Decoding a character é

    Hi Guys,

    Now I'm trying to decode a character.
    Reading it from a File opened in Binary.

    Now i know that character é should represent the value of: 124
    But i can't figure out how to decode it.
    Ive tried BitToDec: 00110010 é
    I've tried Big/Little endian
    I've tried ToLong/ToInteger

    Any ideas?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Help Decoding a character é

    Not too sure what your problem is. I created a file with the character é in it and used this to read it:
    Code:
    Option Explicit
    
    Private Sub Command_Click()
    Dim intFile As Integer
    Dim strFile As String
    Dim bin(0) As Byte
    intFile = FreeFile
    strFile = "C:\test.txt"
    Open strFile For Binary As intFile
    Get #intFile, , bin(0)
    Debug.Print bin(0); " ("; Hex(bin(0)); ")"
    Close intFile
    End Sub
    and got the result of
    233 (E9)

    What made you think it ought to be 124?

  3. #3

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Help Decoding a character é

    Well there is another program where you enter the Tempo speed which is 124. When that file is saved 124 is saved as a single byte char é.
    I believe 40 = chr(189), 41 = chr(190) etc.. but not always...

    So most likely 233 (E9) is subtracted/added with something else to get 124.
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Help Decoding a character é

    The thing is that just because you might enter 124 doesn't mean that the program will store it. Perhaps the data you input is scaled in some way to suit the program and stored as it's scaled value.
    Last edited by Doogle; Sep 13th, 2010 at 06:37 AM.

  5. #5
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Help Decoding a character é

    Make multiple files where the only thing that changes is the tempo. Have at least mid setting, one more or less, minimum setting, maximum setting. Then compare extensively these four files.

    Also, don't bring characters into play – there are too many character sets out there to be sure what é might represent. Just work with pure data you get off the file, I'd prefer hex values & hex editor over anything else.

    You may also want to have a look to file format documentation that could well be available on the Internet.

  6. #6

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Help Decoding a character é

    Hi Merri,

    Yes that's what I've been doing so far. Changing and comparing files. I've also been using all sorts of tools/Hex editors to try and figure it out.

    I can get the Binary of 00110010 for é. OR
    12 239 21 0 as a Byte with CopyMemory.

    As for documentation, that's the whole problem. No documentation.
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  7. #7

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Help Decoding a character é

    I think I just found it:

    Seems i was looking at the wrong place with the HEX. What seemed to have changed was most likely the new file size chunk which is why it didn't make sense. But having compared with a HEX again I saw, another area being affected too which were the actual values.

    So problem solved
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  8. #8
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: [RESOLVED] Help Decoding a character é

    In that case can you share some files and tell what exactly has been changed between them? I have some experience in figuring out undocumented file formats, so I may be able to figure something out; without seeing the rest it is next to impossible to find out what you may be hitting your head against, there are too many possibilities.


    Edit!
    Ah, good it was that simple.

Posting Permissions

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



Click Here to Expand Forum to Full Width