[EMAIL PROTECTED] writes:
> The lack of an UNISIGNED INT1 attribute type forces those of us who
> need a positive numeric byte type to use CHAR.  The ascii() function
> ostensibly returns the numeric ASCII value of the corresponding CHAR
> attribute value - but once you get beyond the 0-127 ACCII character
> value range, the ascii() function starts picking up the active high
> order bit as a sign bit.  This is not too surprising but it is a bit
> bizarre since I tend to think of character encoding standards having
> the option of using the 127-255 character values.

If you use gcc, you could probably recompile the backend with
-funsigned-char to make ascii() work the way you want.

On a machine where char is considered signed, I'm not sure that
ascii()'s behavior is wrong ... could argue that either way I suppose.

                        regards, tom lane

Reply via email to