Bug in ANSI C??

Chris Calabrese[rs] cjc at ulysses.homer.nj.att.com
Fri Feb 19 00:56:41 AEST 1988


In article <16 at dcs.UUCP>, wnp at dcs.UUCP writes:
> In article <2118 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
>  >In article <241 at oracle.UUCP> rbradbur at oracle.UUCP (Robert Bradbury) writes:
>  >>On another note; does everyone realize that the current standard allows
>  >>the results of the str/memcmp() function to be implementation defined
>  >>if the characters being compared have the high-bit set?
> 
> The purpose of this would be to allow the use of the "alternate" character
> set (= codes > 127) to be used for international language applications.
> Languages which have more than 26 alpha characters need the upper half
> of the eight-bit code range to implement their languages, and in that
> case ignoring the 8th bit would be very counter-productive.

If ansi wants this to really work, they'll have to allow for
16 bit char's, the standard in Japanese and Chinese language
word processors.  There is still a problem with
using the 8th bit, as many machines generate strict parity
for character work.  Assumably, the lexical ordering probelem
can be eliminated by stripping the 8th bit before comparison,
or better yet, 15 bit char's with 1 bit parity, or any
other combo.

	Chris Calabrese
	AT&T Bell Labs
	ulysses!cjc



More information about the Comp.lang.c mailing list