Subject: Re: [boost] boost utf-8 code conversion facet has security problems
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-10-18 03:36:17
On 18.10.2010 08:07, Patrick Horgan wrote:
> On 10/16/2010 06:10 AM, Sebastian Redl wrote:
>> On 16.10.2010, at 00:23, Patrick Horgan wrote:
>>> Support of the recent C++ drafts requires a char32_t basic type
>>> anyway, so I can't imagine anyone using a 16-bit wchar_t going forward,
>> There's absolutely no way Windows programming will ever change
>> wchar_t away from 16 bits, and people will continue to use it.
> Then that implies that it can only hold UCS2. That's a choice. In
> C99, the type wchar_t is officially intended to be used only for
> 32-bit ISO 10646 values, independent of the currently used locale.
> C99 subclause 6.10.8 specifies that the value of the macro
> shall be "an integer constant of the form yyyymmL (for example,
> 199712L), intended to indicate that values of type wchar_t are the
> coded representations of the characters defined by ISO/IEC 10646,
> along with all amendments and technical corrigenda as of the specified
> year and month." Of course Microsoft isn't able to define that, since
> you can't hold 20 bits in a 16 bit data type.
Microsoft defines wchar_t to be a UTF-16 2-byte unit, screw the standards.