id summary reporter owner description type status milestone component version severity resolution keywords cc 1836 bug in serializing wide character strings Jeff Faust Robert Ramey "We've discovered an issue Boost has writing and reading wide character strings (wchar_t* and std::wstrings) to non-wide character file streams (std::ifstream and std::ofstream). The issue stems from the fact that wide characters are written and read as a sequence of characters (in text_oarchive_impl.ipp and text_iarchive_impl.ipp, respectively). For text streams, an EOF character terminates the reading of a file on Windows. Some wide characters have EOF (value = 26 decimal) as one of the bytes so reading that byte causes early termination of the read. We have worked around the issue by deriving our own input and output archives from text_i|oarchive_impl and overriding load_override() and save_override for std::wstring and wchar_t*. Our implementation just sequences through the wide characters and writes them 1 by 1 as wchar_t to the archive. This isn't very elegant and is even less readable in the file than the current implementation but does resolve the problem. Although the test test_simple_class does test wstrings, it only uses characters 'a'-'z' which does not expose this problem. " Bugs assigned To Be Determined serialization Boost 1.34.1 Problem wstring wchar_t jeff@… Sohail Somani