Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!ctrsol!cica!iuvax!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: UprString problem. Message-ID: <17296@dartvax.Dartmouth.EDU> Date: 27 Nov 89 19:22:38 GMT Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 27 I am trying to build character case translation tables for a single-byte character set using UprString(). I build a character array with all 255 non-NUL values in it, then pass it to UprString(). I want UprString() to convert all alphabetic characters to upper case, while leaving non-alphabetic characters alone. Based on the result of this operation, I then build upper to lower and lower to upper character translation tables. I also use the information to determine whether a given character is a letter and not punctuation. If the case of a character can be changed, then it is obviously not punctuation. Everything works fine, except that UprString() converts '`' (back-quote) to lower case 'a'. This happens with System 5.0, System 6.0.3, and System D1-6.0.3 (Deutsch). I have tried it on a Mac Plus and on a Mac II. Always, '`' -> 'a'. Most distressing. I could use Transliterate() or LwrText() to build the same tables, but these are not available on all Macs and I want this particular code to be as compatible as possible. Is this a bug in UprString()? What should I do? I suppose I could write code to detect the inconsistency and attempt to correct it... Are there any other bugs in this routine which manifest on systems other than U.S. and Deutsch? Earle R. Horton