From c87d46c2af765e61b64dfb0859760b46cb432a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 6 Feb 2017 00:06:34 +0100 Subject: Msg_Export: Fix exporting unicode messages, make it even faster (addresses #609) Previously code worked with opening file and loading BOM at writing each event. When we stopped closing/opening file at each event it couldn't read BOM anymore, so it wrote messages in wrong codepage. This is not fixed by parameter defining we are just appending the file, so it doesn't need to determing BOM or even check file size. Thanks to this exporting is now about 70% faster than the initial optimization commit (in sum 13.5x faster than before). --- plugins/Msg_Export/src/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Msg_Export/src/utils.h') diff --git a/plugins/Msg_Export/src/utils.h b/plugins/Msg_Export/src/utils.h index de0055fccc..6835ba182b 100755 --- a/plugins/Msg_Export/src/utils.h +++ b/plugins/Msg_Export/src/utils.h @@ -57,7 +57,7 @@ void ShowDebugInfo(); bool bIsExportEnabled(MCONTACT hContact); HANDLE openCreateFile(tstring sFilePath); -bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, tstring sFilePath); +bool bExportEvent(MCONTACT hContact, MEVENT hDbEvent, HANDLE hFile, tstring sFilePath, bool bAppendOnly); int nExportEvent(WPARAM wparam, LPARAM lparam); int nContactDeleted(WPARAM wparam, LPARAM lparam); -- cgit v1.2.3