OSDN Git Service

2005-05-10 Perry
authorPerry Rapp <elsapo@users.sourceforge.net>
Tue, 10 May 2005 16:02:32 +0000 (16:02 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Tue, 10 May 2005 16:02:32 +0000 (16:02 +0000)
 BUG [ 1198622 ] Generated patch is broken when comparing UTF8 files
  Bail out of OlecharToUTF8 if BOM not UCS-2.
  Src/Common: multiformatText.cpp

Src/Common/multiformatText.cpp
Src/readme.txt

index d97323e..243b877 100644 (file)
@@ -703,8 +703,14 @@ BOOL OlecharToUTF8(CString & filepath, LPCTSTR filepathDst, int & nFileChanged,
        UniMemFile ufile;
        if (!ufile.OpenReadOnly(filepath) || !ufile.ReadBom())
                return TRUE; // not unicode file, nothing to do
+       int unicoding = ufile.GetUnicoding();
        // Finished with examing file contents
        ufile.Close();
+
+       // 2005-05-10, Perry: What are we supposed to do here?
+       // This is happening with patch generation for UTF-8 files
+       if (unicoding != ucr::UCS2LE)
+               return FALSE;
        
        // Init filedataIn struct and open file as memory mapped (input)
        BOOL bSuccess;
index a0ad48d..6f21546 100644 (file)
@@ -1,5 +1,10 @@
+2005-05-10 Perry
+ BUG [ 1198622 ] Generated patch is broken when comparing UTF8 files
+  Bail out of OlecharToUTF8 if BOM not UCS-2.
+  Src/Common: multiformatText.cpp
+
 2005-05-09 Perry
- [ 1195486 ] Remember dircompare sort column
PATCH [ 1195486 ] Remember dircompare sort column
   Fix to save options after editing, so columns don't revert.
   Src: DirView.cpp