View Ticket
Not logged in
Ticket UUID: 490b6c2eddccbc6a1cfa03cd4d1ecfd544b7e655
Title: Chinese windows file name require convert from mbcs to utf8
Status: Open Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2012-10-22 07:54:24
Version Found In: all
Description & Comments:
The problem is it require convert from mbcs file name into utf8 before added to sqlite db. It may use the same function which sqlite process the filename.

Here is the log

  • Case 1: It added to fossil repository, but can not display correct file name by 'fossil ui'.
C:\tmp\s>echo. > 中文檔名.txt
C:\tmp\s>fossil extra
中文檔名.txt

C:\tmp\s>fossil add .
c:\bin\fossil.exe: cannot add _FOSSIL_
c:\bin\fossil.exe: cannot add _FOSSIL_-journal
ADDED  中文檔名.txt
  • Case 2: If Chinese file name contains '\', It can not added to fossil repository.
C:\tmp\t>echo. > 許檔名.txt

C:\tmp\t>dir
 磁碟區 C 中的磁碟沒有標籤。
 磁碟區序號:  2CA2-66A2

 C:\tmp\t 的目錄

2011/04/24  下午 09:29    <DIR>          .
2011/04/24  下午 09:29    <DIR>          ..
2011/04/24  下午 09:29             7,168 _FOSSIL_
2011/04/24  下午 09:29                 3 中文檔名.txt
2011/04/24  下午 09:29                 3 許檔名.txt
               3 個檔案           7,174 位元組
               2 個目錄   2,522,914,816 位元組可用

C:\tmp\t>fossil add .
c:\bin\fossil.exe: cannot add _FOSSIL_
c:\bin\fossil.exe: cannot add _FOSSIL_-journal
ADDED  中文檔名.txt
ADDED  ?檔名.txt

C:\tmp\t>fossil ci
C:\tmp\t>fossil ci

# Enter comments on this check-in.  Lines beginning with # are ignored.
# The check-in comment follows wiki formatting rules.
#
# user: dlin
# tags: trunk
#
# ADDED      ?檔名.txt
#
# Since no default text editor is set using EDITOR or VISUAL
# environment variables or the "fossil set editor" command,
# and because no check-in comment was specified using the "-m"
# or "-M" command-line options, you will need to enter the
# check-in comment below.  Type "." on a line by itself when
# you are done:
insert special filename with \
.
c:\bin\fossil.exe: cannot open C:/tmp/t/?檔名.txt for reading
c:\bin\fossil.exe: SQLITE_BUSY: statement aborts at 2: [ROLLBACK] cannot rollbac
k transaction - SQL statements in progress

anonymous claiming to be dlin added on 2011-04-24 13:45:48 UTC:
I've tried to add sqlite3_win32_mbcs_to_utf8 code before add_one_file(). But I'm stupid, it can not work by my direty patch.

But, the result seems have some effect.

C:\tmp\t>d:\fossil add .
ADDED  閮望???txt

C:\tmp\t>d:\fossil ci
d:\fossil.exe: missing file: 閮望???txt
d:\fossil.exe: aborting due to prior errors

jan.nijtmans added on 2012-10-22 07:54:24 UTC:
This should be fixed in (upcoming) version 1.24