Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!gvgpsa!gold.gvg.tek.com!shaunc From: shaunc@gold.gvg.tek.com (Shaun Case) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: ALED goes to the wastebasket here in Iceland Message-ID: <2554@gold.gvg.tek.com> Date: 17 Jun 91 20:25:57 GMT References: <1991Jun15.172306.19724@uwasa.fi> <1991Jun15.222200.26041@cbfsb.att.com> <3259@krafla.rhi.hi.is> Organization: Grass Valley Group, Grass Valley, CA Lines: 85 In article <3259@krafla.rhi.hi.is> frisk@rhi.hi.is (Fridrik Skulason) writes: > >But why bother with this - the software does not have to do anything special to >allow our characters - all we ask for is that programmers do not put in extra >code to prevent us from using our language. > But... > In article nelson@clutx.clarkson.edu (aka NELSON@CLUTX.BITNET) writes: > >How about it, you non-English speakers? Give us English-speaking programmers > >a break and tell us what we need to do to get our programs to work on your > >computers... > > Here is a short list... > > 1) Don't mask the 8th bit away - even though you don't use it, it does not > mean that it is not needed elsewhere. > > 2) If you plan to provide support for other code pages than CP 437, don't > attempt to make your program aware of all the code pages - you will > miss some. > > 3) Instead, the following information should be user-definable: > > a table for the toupper() function - DOS only provides this if you > are using 3.0 or higer. > > a table for the tolower() function - not provided by DOS. > > a table for the isalpha() - even if a character above 127 is not > alphabetic in your character set (CP 437), it does not mean it > is not alphabetic anywhere else. > > 4) If you provide any translation between code pages, (if the program is a > terminal emulator, for example) make them fully user-definable. > > -frisk I'm having trouble reconciling these two posts. I don't write editors (there are plenty of good ones already) but I want the programs that I do write to work anywhere, (including Iceland.) Between the two posts, I have become confused. (A bad thing when you are a programmer!) I write in C almost exclusively, and I have been aware of the need for the 8th bit for a while, so I usually don't treat user-inputted text much. However, when I am getting options from a menu, or asking for a drive letter or a filename, I usually convert everything to lower case using tolower(), either to reduce the number of comparisons in a switch(){} statement, or to make things look nicer. (I don't like the look of "c:\fILes\ZIP\archive\*.*".) My question is, what do I have to do to make my software usable world-wide if I am *NOT* writing an editor? Write my own toupper(), tolower(), and isalpha() routines, with an editor for each table? (If so, why doesn't someone post some code they've already written and released into the public domain to cbip or alt. sources, or upload it to Simtel or Garbo?) Gak. Maybe I should just stay away from those functions... Shaun. What's just as bad as 8th-bit stripping programs is news software that requires the junk below to post articles... filler filler filler filler filler filler filler filler filler filler filler filler -- shaunc@gold.gvg.tek.com -- 100,000, perhaps 200,000 or more Iraqis died in a "Turkey Shoot" inappropriately called a "war." -- Michael Albert