B
Boris
Hi,
I saved a notepad textfile with "unicode" coding and tried this code:
std::wifstream
in( "test.txt" );
assert( in );
in.unsetf( std::wios::skipws );
std::wstring
w = std::wstring( std::istream_iterator< wchar_t, wchar_t >( in ),
std::istream_iterator< wchar_t, wchar_t >());
std::wcout << w << std::endl;
Unfortunatly I get
■t e s t u n i c o d e
instead of
test unicode
I like to get rid of the redundant spaces and the control charakter at the
beginning. When I do this for "ANSI" encoding, everything is ok.
Can anybody help?
Thanks,
Boris
I saved a notepad textfile with "unicode" coding and tried this code:
std::wifstream
in( "test.txt" );
assert( in );
in.unsetf( std::wios::skipws );
std::wstring
w = std::wstring( std::istream_iterator< wchar_t, wchar_t >( in ),
std::istream_iterator< wchar_t, wchar_t >());
std::wcout << w << std::endl;
Unfortunatly I get
■t e s t u n i c o d e
instead of
test unicode
I like to get rid of the redundant spaces and the control charakter at the
beginning. When I do this for "ANSI" encoding, everything is ok.
Can anybody help?
Thanks,
Boris