From: Radical DOT NetSurfer AT delorie DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible bug Date: Sat, 22 Sep 2001 20:39:43 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <004601c142e7$6f0a2920$323647a1 AT robert> <1pkoqt4ocnvr400nklea28vr51no8tkbsh AT 4ax DOT com> <9oi2nc$1jc$1 AT barcode DOT tesco DOT net> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse AT supernews DOT com Lines: 86 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com MANY USERS to this very day, Email me (radsmail AT juno DOT com) asking me what I've done to fix problems encountered with "unusual" (to say the least) reaction to DJGPP's strupr/strlwr, toupper/tolower, (and for sake of consistancy) isupper/islower, routines. IT WAS A ROUTINE TO FILTER AND RENAME file names from web-site (and usenet) downloads, that contained "freaky" foreign and just dump-a** characters. I would suggest this if you want to understand this picture (mind you this was in DJ 2.01/GCC 2.81) generate a string of random length, containing random characters 32 to 255 decimal. string = s_lwr = s_upr //make 3 copies of these for side by side comparison in printf generate_rnd_string( string ); printf(Original: %s\n, string ) printf(Lower: %s\n, s_lwr ) print(Upper: %s\n, s_upr ) now, I ask you, whats interesting here to your eyes? NEXT phase: break the string down, using a for or while(), and use isupper, and islower to examine individual characters: while(*ptr++ != 0) { if isupper( *ptr) printf Upper_Char else if islower(*ptr) printf Lower_Char else printf Neutral_Char; }; "neutral_char" should be ALL NON ALPHABETIC characters... __but__ what do your wonderous eyes behold???? Have I made my point? NOTE: now modify the while() above and this time apply "toupper", "tolower" ...well...I just can't say anymore right now, I have an appointment with Borland... email: radsmail AT juno DOT com http://members.tripod.com/~RadSurfer/ Join us on Yahoo at: http://groups.yahoo.com/group/BorlandCPPBuilder for informal discussions about all versions of C++Builder... [Computer programming for Windows 95, and Console32] (you must be a Yahoo member to join) On Sat, 22 Sep 2001 14:17:55 +0100, "Graham Warren" wrote: > >Radical NetSurfer wrote in message ><1pkoqt4ocnvr400nklea28vr51no8tkbsh AT 4ax DOT com>... >>221T (decimal) = $DD = 335O (octal) produces for me in windows >>a pipe-like character that has a tiny break in it, >> >>while the usual pipe char, 124T ($7C = 174O) in windows, appears as a >>solid pipe character. >> >> Now.. >>In pure MSDOS terms (running an msdos editor in this case), >>I get just the opposite appearence from these two values! >> >>where, indeed, ALT0221 does produce a "fat-pipe" >> >>go figure! >> >>now if only the bugs in the GCC library relating to >>strupr, strlwr, and toupper, tolower were only fixed. >> > >What are the bugs relating to strupr, strlwr and toupper and tolower ? >