[Bug libstdc++/40184] locale(const char* std_name) can create invalid facets for nonuniform locale

tsyvarev at ispras dot ru gcc-bugzilla@gcc.gnu.org
Mon May 18 14:37:00 GMT 2009



------- Comment #2 from tsyvarev at ispras dot ru  2009-05-18 14:37 -------
Yes, this seems reasonably. I also thought about smth. similar to this. Only it
is need to take into account using mbsrtowcs for other locale properties(if
they exist in others categories).

Anyway, checking of mbsrtowcs result could be usefull, at least for terminate
resulting string with '\0' if mbsrtowcs cannot convert input string for some
reason. E.g., there is a system where mbsrtowcs() cannot convert every
non-ASCII character, but all other locale features work correctly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40184



More information about the Gcc-bugs mailing list