Fossil SCM

Adding files with non-English file names is not cross-platform

Fixed

d22946aa0c8052c… · opened 15 years, 4 months ago

Type
Code_Defect
Priority
Severity
Important
Resolution
Fixed
Subsystem
Created
Dec. 12, 2010 6:14 p.m.

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.

Comments (1)

jan.nijtmans 13 years, 4 months ago

Should be fixed in 1.25

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button