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,990 of 243,242   
   James Kuyper to Michael Sanders   
   Re: Unicode...   
   18 Nov 25 14:27:53   
   
   From: jameskuyper@alumni.caltech.edu   
      
   On 2025-11-17 18:49, Michael Sanders wrote:   
   > On Fri, 14 Nov 2025 21:03:38 -0000 (UTC), Michael Sanders wrote:   
   >   
   >> Well, I finally got bitten by Unicode.   
   >>   
   >> [...]   
   >   
   > Smallest Unicode test I can manage. Might prove handy in some contexts:   
   >   
   > #include    
   > #include    
   > #include    
   >   
   > int got_unicode(void){   
   >     char *l = setlocale(LC_CTYPE,"");   
   >     return (l && strstr(l,"UTF-8"));   
   > }   
   >   
   > #define U(uni, asc) (got_unicode() ? (uni) : (asc))   
   >   
   > int main(void){   
   >     printf("%s\n", U("Unicode OK: ✓", "No Unicode."));   
   >     return 0;   
   > }   
      
   Could you identify which document guarantees that every Unicode locale   
   contains "UTF-8"? Do you know what the domain of applicability of that   
   document is? It apparently does not cover my Ubuntu Linux system. The   
   command "locale -a" provides a list of all supported locales. Here's   
   what it says:   
      
   C   
   C.utf8   
   en_AG   
   en_AG.utf8   
   en_AU.utf8   
   en_BW.utf8   
   en_CA.utf8   
   en_DK.utf8   
   en_GB.utf8   
   en_HK.utf8   
   en_IE.utf8   
   en_IL   
   en_IL.utf8   
   en_IN   
   en_IN.utf8   
   en_NG   
   en_NG.utf8   
   en_NZ.utf8   
   en_PH.utf8   
   en_SG.utf8   
   en_US.utf8   
   en_ZA.utf8   
   en_ZM   
   en_ZM.utf8   
   en_ZW.utf8   
   es_AR.utf8   
   es_BO.utf8   
   es_CL.utf8   
   es_CO.utf8   
   es_CR.utf8   
   es_CU   
   es_CU.utf8   
   es_DO.utf8   
   es_EC.utf8   
   es_ES.utf8   
   es_GT.utf8   
   es_HN.utf8   
   es_MX.utf8   
   es_NI.utf8   
   es_PA.utf8   
   es_PE.utf8   
   es_PR.utf8   
   es_PY.utf8   
   es_SV.utf8   
   es_US.utf8   
   es_UY.utf8   
   es_VE.utf8   
   POSIX   
   ru_RU.utf8   
   ru_UA.utf8   
   uk_UA.utf8   
   zh_HK.utf8   
   zh_TW.utf8   
      
   Are you aware that there's many other Unicode encodings, including   
   UTF-16, UTF-32, GB18030, BOCU, SCSU, UTF-EBCDIC, and UTF-7.   
      
   --- 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