Yet more text pedantry

George Russell ger@tzi.de
Fri, 09 Aug 2002 20:58:10 +0200


Ketil Z Malde wrote:
> 
> George Russell <ger@tzi.de> writes:
> 
> > "Ketil Z. Malde" wrote:
> > [snip]
> 
> >>> and on Solaris the default representation of a characters is as a
> >>> signed quantity.
> 
> >> Why should we care?
> 
> > If you want to talk to any C libraries or C programs which use
> > characters, which some  of us do.  GNU readline and regex come to
> > mind.
> 
> Yes, which is why we all agree on CChar for FFI purposes.
> But we were discussing IO, weren't we?
Well for example I mentioned regex.  Using a different sort of char will
potentially break regex, since it means the meaning of a range of characters
[A..B] will change if A and B have different signs.  So either RegexString will
have to do complicated transformations of the regular expression string to
fix this (you will need to buy Simon Marlow several drinks) or else the
manual will have to admit that the ordering used by RegexString differs from
that used anywhere else.

This is just something that comes to mind, there are probably lots of
other cases where C libraries we might want to interface to provide things
which depend on the order of char.