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 242,054 of 243,242    |
|    bart to Paul Edwards    |
|    Re: C90+ toequiv()    |
|    23 Nov 25 01:28:06    |
   
   From: bc@freeuk.com   
      
   On 15/11/2025 09: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.   
      
   This is quite a big subject, and it spans many areas such as hardware,   
   drivers, OS, displays, character sets, fonts, as well as programming   
   languages and applications.   
      
   Whatever it is you want to do, I doubt it will be solved with one C   
   function.   
      
      
      
   > 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.   
      
   Are you planning to use 8-bit code-pages?   
      
   Those have all sorts of problems which are unlikely to be tolerated   
   these days.   
      
   I suggest you just try and make UTF8 work, even if it's a cut-down   
   version that only supports the first layer of Unicode, which is   
   character codes up 64K.   
      
   Anything else, even going with 16-bit characters, is going to be   
   impractical.   
      
   > So I was thinking I need some halfway point of equivalency.   
      
   That doesn't make sense, sorry. Imagine you were working in Greek and   
   were talking about mapping A-Z to some random Greek latter, but it   
   didn't matter which!   
      
   --- 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