This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UTF-8 support - char or wchar_t?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]