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,378 of 243,242   
   Thiago Adams to Keith Thompson   
   Re: u8"" c11 c23   
   21 Oct 25 07:57:21   
   
   From: thiago.adams@gmail.com   
      
   On 10/20/2025 7:19 PM, Keith Thompson wrote:   
   > Thiago Adams  writes:   
   >> speaking on signed x unsigned,   
   >>   
   >> u8"a"  in C11 had the type char [N]. Normally char is signed   
   >   
   > I would have said "commonly" rather than "normally".  Not an   
   > important point.   
   >   
   >> in C23 it is unsigned char8_t  [N].   
   >>   
   >> when converting code from c11 to c23 we have a error here   
   >> const char* s = u8""   
   >>   
   >>   
   >> I generally "cast char* " to "unsigned char*" when handling something   
   >> with utf8. I am not u8"" , I use just " " with utf8 encoded source   
   >> code and I just assume const char* is utf8.   
   >   
   > That raises another issue.   
   >   
   > The  header was introduced in C99.  In C99, C11, and C17,   
   > that header defines char16_t and char32_t.  C23 introduces char8_t.   
   >   
      
   I think for all these typedefs related with language concepts, like   
   size_t which is related with sizeof, char8_t which is related with u8""   
   char16_t u"", char32_t  U""... etc.. should be built-in typedefs.   
      
   And even others that does not have a association with language features   
   like int16_t.   
      
   --- 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