TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan de Boyne Pollar
from: Ian Timms
date: 1995-03-23 23:29:04
subject: Ignoring case

On the 03-18-95, Jonathan de Boyne Pollard was chatting with Jon Guthrie:

JP>  >  >> What possible difference could that make?  Even in
routines such as
JP>  >  >> C's stricmp() "ignoring case" is generally
performed by converting
JP>  >  >> both compared characters to uppercase for the duration of the
JP>  >  >> compare.
JP>  >
JP>  >  >   John is implying that there's not necessarily a
one-to-one mapping
JP>  >  >   between lower and upper case in all character sets.
JP>  >
JP>  > The normal way of handling that case is to not map the 
JP>  > characters that have
JP>  > no other-case equivalent.
JP>
JP>  Consider the Greek alphabet.

There's a 'Dos' API that should be used in this situation, it ensures you
get the correct corresponding uppercase characters for the specified
country and codepage.

 usRc = DosCaseMap( usLenStr,     
                    &ctrycCountryInfo, 
                    pszAnyStr);   

 Cheers, Ian.

 Internet:itimms{at}ariel.ucs.unimelb.edu.au   CIS:100236,1404   [Team OS/2]
___
 * MR/2 2.1 #141 * Please excuse my DOS. It has WIND.

--- Maximus/2 2.02
* Origin: Bunyip's Cave BBS - +61-3-859-8194 (3:633/379)
SEEN-BY: 620/243 624/50 632/103 301 341 348 363 633/379 635/503 640/820
SEEN-BY: 690/660 711/409 410 413 430 807 808 809 934 949 955 712/515 713/888
SEEN-BY: 800/1 7877/2809
@PATH: 633/379 632/348 711/409 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.