![]() ![]() When you "convert" that 1100 to hex the way you want to do it, you replace it by the ASCII character 'C', whose decimal value is 67. To put it another way: hex representation is for human consumption only, unsuitable (almost always) for program use.įor an example: suppose your pdf file holds a four-bit string "1100," whose human-readable hex representation can be 'C'. See, hex exists only as a human-readable presentation format for binary, each hex digit representing four contiguous binary digits. You must abandon, delete, discard, defenestrate, forget about, and expunge your notion of "converting" any binary file to anything else. You don't "convert" anything, not unless you want to change the binary! A pdf file is a binary file is a binary file. If you think, as you seem to, that you have to "convert" a pdf file to hex, then you are mistaken. You have to first understand and internalize the idea that hex notation is only an easy-to-read representation of binary. You don't have to, and must not, write any such conversion program. But firstly I have to write a program, that will convert this file to hex file." ![]() You said: "I' d like to upload file on server, for example pdf file. ![]() I still claim the exercise is a complete waste of time,since blobs can contain binary data: that's what blobs were invented for. He wants to convert his pdf file to its hex representation, as I see now, because he wants to put that file in a text blob field in some database table. After that, I will upload this file line by line with PL/SQL.ĮDIT: I completely misunderstood what the OP was aiming for. I'd like that the length of a line in hex file would be equal 1024. But firstly I have to write a program, that will convert this file to a hex file. I' d like to upload a file on server, for example a PDF file. After invoking this code I have still strange characters in my file_test file. N = fread(buffer, 1, bufferSize, source) I have written something, but it does not work properly. I' d like to convert binary files to hex. I am trying to write some simple program to uploading files to my server. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |