rem: wchar_utf8(wbuffer, tmp_utf8); char* buffer = tmp_utf8.c_str();
add: libtorrent::wchar_utf8(wbuffer, tmp_utf8); char const* buffer = tmp_utf8.c_str();
context: 	void throw_exception(const char* thrower)	{		int err = GetLastError();#ifdef UNICODE		wchar_t *wbuffer = 0;		FormatMessage(			FORMAT_MESSAGE_FROM_SYSTEM			|FORMAT_MESSAGE_ALLOCATE_BUFFER			, 0, err, 0, (LPWCSTR)&wbuffer, 0, 0);		auto_localfree auto_free(wbuffer);		std::string tmp_utf8;		wchar_utf8(wbuffer, tmp_utf8);		char* buffer = tmp_utf8.c_str();#else		char* buffer = 0;		FormatMessage(			FORMAT_MESSAGE_FROM_SYSTEM			|FORMAT_MESSAGE_ALLOCATE_BUFFER			, 0, err, 0, (LPSTR)&buffer, 0, 0);		auto_localfree auto_free(buffer);#endif		std::stringstream s;		s << (thrower ? thrower : "NULL") << ": " << (buffer ? buffer : "NULL");		throw libtorrent::file_error(s.str());	}