Ok.. thanks for all the thoughts above guys.. I've done the changes and it now reads along the string and converts... BUT, I'm back to sq. 1 which is that not the whole string gets converted. I originally used Dave's code that he kindly posted on my hextobin query a while back which used fscanf...
Hi Guys,
Been looking at a problem with fscanf for a few days now. It seems to stop converting hex to binary (infile, "%2x", &ch ) towards the end of the data, although all the data is legit. Soo, I thought, because of some of the problems with the scanf family, I'd change to use fgets and then...
It's on unix/solaris 8.. I'm using cc. And the pattern is definitely repeating.. Going to try the fgetc route and see if I can convert that to binary and write one at a time.. fingers x'ed!!
Ok.. Sussed what is happening.. fscanf returns an EOF part way through the scanning of the 'hex' file. What is wierd is that it reports EOF in a repeating pattern towards the end of the file, after it has already successfully trnaslated an earlier repeat of the pattern. I think it maybe...
Sure Salem,
It's not pretty:
"E1D90500809B3A3C9B4CE1D90500809B3A3C9B4CE1D90500809B3"
When it finishes processing 4c, it fails to convert E1 and returns EOF. The pattern is repeated before this point and it converts successfully. Possibly a buffering issue?
Thanks!!
thread205-1155185.
Spoke to Dave Sinkula and he gave me a great function to convert hex to bin (below). It's taken a while for me to get round to finishing this but I seem to have conversion errors when I look at the binary file. Some of the end of the pages look corrupt. - Usually the last...
Cheers William.. I tried a whole suite of uninstalls and re-installs.. Turns out 8i client will talk to 9i DB version anyways.. So I've left it as it was and it seems to be fine.
Thanks,
Just loaded oracle 9.2.0.1 and get the following error when trying to add an odbc source:
"the setup routines for the Oracle ODBC driver could not be loaded due to system error code 998"
followed by:
"Could not load the setup or translator library"
I have added the oracle areas for the...
Hi Dave,
My final output should be a tif image. Someone has mentioned 'base64' in relation to this.. So, to summarise, a message comes into the application in a tif format. It is then converted from tif into a hex representation. I need to get this hex representation and convert it back to a...
Hi Dave,
Yep, basically I have an application that converts a tif file (in effect the format of any file received over FAX) into hex so it can be easily routed via MQ or SMTP, and I need to build an app. to convert it back to a tif. I've got some code I've built in C to do the mq get and record...
Hello,
I have set up a requestor / server channel setup between our site (requestor) and a carrier/vendor (server). However, I seem to have to keep restarting the requestor channel as it keeps timing out. Any thoughts on what needs to change?
Thanks!
Ritesh
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.