home bbs files messages ]

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

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

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

   Message 32,686 of 33,346   
   Richard Damon to Francis Glassborow   
   Re: UTF-8   
   24 Nov 12 15:58:24   
   
   From: news.x.richarddamon@xoxy.net   
      
   On 11/23/12 9:15 PM, Francis Glassborow wrote:   
   >>   
   >> No, I don't think so.   
   >>   
   >> We already have three 8-bit char types, some of which CAN be used with a   
   >> UTF-8 encoding. The committee was very reluctant to add a forth 8-bit   
   >> char type, possibly identical to one or more of the old ones on some   
   >> platforms.   
   >>   
   >> It's already confusing enough.   
   >   
   >   
   > Even more so because C++ does not have any 8-bit types :) Granted the   
   > three char types only require 8-bits but they can (on on some platforms   
   > are) wider.   
   >   
   > The basic question is whether we need a pure 8-bit type (one that is   
   > required to be only 8 bits wide).   
   >   
   > Francis   
   >   
   >   
      
   That would be uint8_t (or int8_t) from    
   If it is available, it MUST be exactly 8 bits wide.   
      
   There might be some use in defining a type that MUST be unicode, but   
   does the standard really want to force all implementations to use   
   unicode? Should it also define a type that must be ASCII or EBCDIC?   
      
   What might be more useful is a variation of typedef that creates a new   
   type for overloading, so you could do something like   
      
   typedef uint8_t new char8_t;   
      
   and then overload functions on both types.   
      
   Then the community could develop this sort of library, and either become   
   "other standards" (like POSIX), or eventually adopted as into the   
   language as existing practice.   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- 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