Serge Rielau wrote:
> That will do. Isn't 1252 Unicode?
No - 1208 is UTF-8, 1252 is windows-1252 (MS' slightly altered version
of ISO-8859-1 [1]).
I'm tempted to say the codepage thing is a dead-end; after all; there's
not /that/ much difference between win-1252 and ISO-8859-1 - the only
way it could make a difference is if you were feeding the routine the
few characters that differ (none of which are 'abc' as in your earlier
example ;-), or if the routine internally relies on the encodings of
these characters ... which I doubt (see below).
I'd be tempted to look at the difference in processors. You state the
routine is implemented in C, is performing bitwise operations (not
unusual for a hash function), that the dev machine has a ppc 604 (which
according to [2] is 32-bit), and that the qa machine has a power4
(64-bit according to [3]). I wonder whether this could explain it (I'm
insufficiently familiar with the ppc family to know whether it could or
couldn't - just curious).
In the meantime, your example of ha****ng 'abc' indicates that this is
an implementation of the SHA1 algorithm. I'd suggest taking a look at
the mod_authnz_ibmdb2 article [4] by Helmut which includes C-based UDFs
for MD5, SHA1, and crypt.
[1] http://en.wikipedia.org/wiki/Windows_1252
[2] http://en.wikipedia.org/wiki/PowerPC_604#PowerPC_604
[3] http://en.wikipedia.org/wiki/Power4
[4]
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0407tes
sarek/
Cheers,
Dave.


|