------- Comment #9 from paolo dot carlini at oracle dot com 2009-01-09 09:56 ------- ... and, by the way, exactly because your codecvt is broken - doesn't properly convert each in-memory wchar_t to a single external char - you maintain to see 1 / 4 of the expected "Forecast" strings: actually you are seeing the expected total number of chars but each time, each char in "Forecast" is followed by 3 '\0' chars, the in-memory last three bytes of each wchar_t of L"Forecast".
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38741