vector<u16string>, cout, ostringstream not working together.
see https://groups.google.com/forum/#!topic/alt.comp.lang.learn.c-c++/CY7RxUBj_2c
any clues as to how I can fix this mismatch? this should not be a problem but I guess some UNICODE stuff is unimplemented as yet (2/2014). there is a suggestion as to what to do, but it is unclear exactly what, I saw no code examples.
Your ograph is defined as a byte output stream (std::ostringstream), so depending on the imbued locale, it can accept various narrow/multibyte strings (ASCII, UTF-8, GB18030, what-have-you), but not 16-bit, 32-bit, or wide strings.
In standard C++, you would convert from UTF-16 to wide and use std::wcout or to UTF-8 and use std::cout, but there is no direct way to print a u16string in C++ (except where the OS provides APIs for that: Windows does). I recommend against 16-bit encodings: Unicode went 32 bit almost 15 years ago.
I have no access to a Windows system so i can't really help with mingw, but why can't you use wide strings?
<bits/codecvt.h> is gcc's internal header, which isn't related to <codecvt>, the C++11 header which is not implemented in gcc's library (Microsoft's and clang's libraries both implemented it back in 2010, for comparison)
I recommend boost.locale, it's known to work with mingw and is portable (or simply wide strings if you don't need much)