home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,972 of 243,242   
   Paul Edwards to All   
   C90+ toequiv()   
   15 Nov 25 17:33:04   
   
   From: mutazilah@gmail.com   
      
   I am not 100% sure, but I believe some people (Greeks?)   
   have keyboards such that their native character set can be   
   freely entered, when they're working in their native language.   
      
   And if they are required to work in English, or rather, 7-bit   
   ASCII, they will "switch keyboards", ie using the mouse or   
   whatever to select a different keyboard, and type the English,   
   and then return to the Greek etc keyboard.   
      
   I'm interested in a slight change to C90. I'm not interested in   
   UTF-8 either.   
      
   I'd like to write a program using pure ASCII, and indeed, pure   
   English prompts, but not force a Greek user to switch keyboards.   
   I'm not interested in a complicated translation layer either.   
      
   Originally I was thinking I just need to modify my programs and   
   the Greek locale so that I could do:   
      
   if (toupper(c) == 'X') printf("whatever\n");   
      
   And make some random Greek character the equivalent of 'X', ie   
   the Greek user knows that when prompted to type 'x' (or 'X'), he   
   just needs to press (lambda or whatever Greeks use). The Greek   
   locale will convert lambda into X when passed to toupper.   
      
   However, it was pointed out to me that this would interfere with   
   storing filenames on traditional FAT, for example. Not everything   
   should be subject to uppercasing. The Greek, or Katakana, should   
   be preserved, not converted into ASCII gibberish.   
      
   So I was thinking I need some halfway point of equivalency.   
      
   I'm happy to change all my programs so that they don't rely on   
   the user typing in an exact character. ie I am happy to drop case   
   sensitivity from everything, "now that I know there's an issue".   
   Actually there are other environments where case sensitivity is   
   difficult. e.g. some CMS (mainframe) environments.   
      
   And making sure I do toupper() is a way to solve the issue for   
   the environments where case-sensitivity is difficult/impossible.   
   (assuming they exist).   
      
   But I'd like to go one step further and cater for Greeks etc.   
      
   And it seems to me that I want to not change toupper() - which   
   would be expected to uppercase Greek characters (or some   
   other language), independent of the uppercasing of any English   
   characters they happened to enter (potentially at "great effort"   
   of changing keyboards).   
      
   And what I'm really after is being able to designate some Greek   
   characters as the equivalent of English counterparts in circumstances   
   where that is appropriate, and there is a desire to avoid a keyboard   
   change. So a new isequiv() function as an extension to C90. (I'm   
   basically forking C90 to create a C90+ or C90.0.1 - same as we   
   do with software - bells and whistles go into C99 etc, not C90.0.1)   
      
   Any thoughts?   
      
   Thanks. Paul..   
   a   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca