implement changes suggested by Philip:

- add self-test
- allow decoding UTF8 values beyond BMP (and replace them later)
- quietly replace invalid bytes

This was SVN commit r7187.
This commit is contained in:
janwas
2009-11-09 20:53:48 +00:00
parent 593bf6a571
commit ff15c522fe
18 changed files with 138 additions and 60 deletions
+1 -1
View File
@@ -375,7 +375,7 @@ void CNetLogFileSink::OpenFile( const fs::wpath& fileName, bool append )
if ( m_File.is_open() ) m_File.close();
// Open the file and log start
m_File.open( UTF8_from_wstring(fileName.string()).c_str(), append ? std::ios::app : std::ios::out );
m_File.open( utf8_from_wstring(fileName.string()).c_str(), append ? std::ios::app : std::ios::out );
if ( !m_File.is_open() )
{
// throw std::ios_base::failure