Ticket Change Details
Not logged in
Overview

Artifact ID: 7b1ce666a7ff7bdd4987d00e64268758ba3d9c37
Ticket: d22946aa0c8052c4dc6edd4b296cb2cb3bc80d7d
Adding files with non-English file names is not cross-platform
User & Date: anonymous 2010-12-12 18:14:26
Changes

  1. comment changed to:
    Reproducing the problem, step by step:
      #  Create an empty repository on Linux.
      #  Add a file with non-English file name, say "Текст-01.txt" (the word "text" in Russian with numeric suffix), commit the changes.
      #  Clone repository to Windows machine. In the process of opening the cloned repository Fossil will create file with name "Текст-01.txt", which is definitely is not the file name user expects.
      #  Again, add a file with non-English file name (for the above example it would be "Текст-02.txt", commit the changes and sync with the parent repository.
      #  Update the working copy on Linux. In the result there will be a new file with file name "�����-02.txt", not the original Windows file name. Besides that, the manifest file contains file names in mixed encoding and it is a considerable problem when you try to parse it with console-based tools.
    
    From examining the sources I see that Fossil doesn't differentiate file name encoding on different platforms and assumes it to be always UTF-8. In the contrast, on Windows console applications always use national code pages for file names. In the case of Russian localization of Windows the encoding of file names will be Windows-1251.
    
    In src/db.c there are cases of using sqlite3_win32_mbcs_to_utf8() function when reading the repository database, so it opens even if the file name or path contain non-English characters, but no additional conversions (MBCS to UTF-8, UTF8 to MBCS) are made in the process of working with repository files.
    
  2. foundin changed to: "[3873aa7ecb]"
  3. private_contact changed to: "5081120eaf9d2becc688bc77c336c97ae00b766d"
  4. severity changed to: "Important"
  5. status changed to: "Open"
  6. title changed to:
    Adding files with non-English file names is not cross-platform
    
  7. type changed to: "Code_Defect"