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?


Paolo Carlini wrote:
...
fstream must use the codecvt facet that's installed in the locale imbued in it. If
the fstream object is imbued with locale("fi_FI.UTF-8") it must
use codecvt_byname<char, char>.


Could you please cite the specific section of the standard requiring this?
Definitely, *not* 27.8.1.1, p5.

No, but I'd say 22.1.1.1.2, p4 strongly suggests that it should be the case. There might be a more explicit requirement somewhere else in clause 22, but I think it just makes sense. Otherwise what would be the point of any of the byname facets at all if an implementation was allowed to construct a named locale with just the base facets in it?


There isn't any codecvt<char, char> in any named locale other than C or POSIX.


For that matter, I don't think any instantiation of codecvt_byname is required...

You must be looking at the old standard. Table 52 of C++ '03 lists the required instantiations of all facets, including codecvt_byname<char, char>. See DR 21.

Martin


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