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,986 of 243,242   
   David Brown to Paul Edwards   
   Re: C90+ toequiv()   
   17 Nov 25 09:02:05   
   
   From: david.brown@hesbynett.no   
      
   On 15/11/2025 10:33, Paul Edwards wrote:   
   > 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   
   >   
   >   
      
   It is not at all clear to me what you are asking about here.  Indeed, I   
   do not think it is at all clear to /you/.  Have you tried talking   
   directly to someone who regularly uses a different alphabet - Greek,   
   Cyrillic, Hebrew, etc.?  Try to explain your idea to them and see what   
   they think.   
      
   At the moment it appears that you want to make "toupper" (or some new   
   function) somehow take Greek letters (without using UTF-8) and turn some   
   Greek lower-case letters into some Latin upper-case letters.  But it   
   should only do that sometimes - not when typing filenames for FAT.   
      
   So which Greek letter to you think should be "equivalent" to Latin X ?   
   Perhaps xi, since it has similar pronunciation to Latin X (in English)?   
   Perhaps chi, since its capital looks very much like a Latin X, though it   
   has a different pronunciation and the lower-case is noticeably   
   different.  And which Greek letter should be "equivalent" to Q, J, or V?   
     What should the Greek letters omega and psi convert to?   
      
   And what are you going to do with Cyrillic alphabets (in all their   
   varieties), and Hebrew, Arabic, or the many dozens of alphabets used in   
   India and south-east Asia?   
      
   --- 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