
8 Aug
2004
8 Aug
'04
11:46 p.m.
On Monday 02 August 2004 16:33, Tilman Kuepper wrote:
inline void Write() { locale loc; locale utf8loc(loc, new utf8_codecvt_facet<wchar_t, char>()); wofstream f; f.imbue(utf8loc); f.open("test.utf8", ios::binary); f << wstr; assert(f); }
Without looking at the real case, the last assert is possibly useless: if there is still data in some internal buffer, only the stream going out of scope will flush that (and perhaps fail to do so). BTDT. Just add an 'f.flush()'. Uli