> #define HEXVALUE(c) \
> (((c) >= '0' && (c) <= '9') ? ((c) - '0') : \
> (((c) >= 'A' && (c) <= 'F') ? ((c) - 'A' + 10) : \
> ((c) - 'a' + 10)))
>
> 3. The third level would be to get rid of the assumption that letters
> are contiguous, which would probably require making a lookup table to
> map from char code to hex value.
>
> I'm not sure level 3 is really worth doing, since AFAIK no one tries to
> run Postgres on any EBCDIC platform. (It's likely that there are other
> places that depend on the letters-are-contiguous assumption anyway.)
> I do think level 1 and probably level 2 are appropriate changes.
>
> regards, tom lane
Hi Guys,
Thanks for the feedback. Tom I'll make the changes proposed here to the macro
and repost the patch to pgsql-patches (and do some reading on Unicode!). I
guess at this stage I would like to offer any of my time to any janitorial
work that might be needed as until im more knowledgeable about the pg source
I think any large scale stuff is off the cards.
Rgds,
Jason