Mail Archives: djgpp/2001/09/22/20:47:56
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"
<Moosehead AT tesco DOT net> 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 ?
>
- Raw text -