Index: src/TortoiseMerge/TortoiseMerge.cpp
===================================================================
--- src/TortoiseMerge/TortoiseMerge.cpp	(revision 15030)
+++ src/TortoiseMerge/TortoiseMerge.cpp	(working copy)
@@ -131,6 +131,10 @@
 			langId = 0;
 	} while (langId);
 	setlocale(LC_ALL, ""); 
+	// We need to explicitly set the thread locale to the system default one to avoid possible problems with saving files in its original codepage
+	// The problems occures when the language of OS differs from the regional settings
+	// See the details here: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100887
+	SetThreadLocale(LOCALE_SYSTEM_DEFAULT);
 
 	// InitCommonControls() is required on Windows XP if an application
 	// manifest specifies use of ComCtl32.dll version 6 or later to enable
