UTF-8 support - char or wchar_t?

Paolo Carlini pcarlini@suse.de
Mon Jun 21 22:57:00 GMT 2004


Martin Sebor wrote:

> Paolo Carlini wrote:
> ...
>  Thanks for pointing out 22.1.1.1.2, p4 and for the interesting 
> obervations.
>
>> However, I think you also see that all those "suggestions" ;) are 
>> definitely
>> inconsistent with 27.8.1.1, p5, which is very clear.
>
> Clear about what? It says how fstream obtains a reference to the
> codecvt facet. It doesn't say that the (dynamic) type of the facet
> is required to be codecvt.

Ok, now I see your strategy: for any locale != "C" you don't provide at all
the instantiation for <char, char, ...>, instead you provide codecvt_byname,
which is not subject to 22.2.1.5, p3. Then (27.8.1.1, p5), use_facet finds
codecvt_byname (it's allowed to do that) instead of the base... Seems 
correct
to me and therefore I see that our QoI is currently worse in this area.

Agreed, thanks.

Paolo.



More information about the Libstdc++ mailing list