[PATCH] codecvt<wchar_t, char, mbstate_t> support for UTF-8

Benjamin Kosnik bkoz@redhat.com
Mon Jan 27 17:55:00 GMT 2003


>> Am I mistaken in thinking that this introduces even more 
>> thread-unsafe 
>> code sequences into the library?
>
>I was under the impression that __use_locale only changes the locale for
>the current thread, so this should be thread-safe on glibc 2.3 systems.
>Is this correct?

You are correct. 

>You are of course right that MB_CUR_MAX is not thread-safe in general
>(since it depends on the global locale set by setlocale). This however
>seems to be a general problem with the generic locale implementation
>(including codecvt<wchar_t, char, mbstate_t>::do_in and do_out).

This is also correct.

-benjamin



More information about the Libstdc++ mailing list