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'.

<verbatim>
> 中文檔名.txt
extra
中文檔名.txt

add .
cannot add _FOSSIL_
cannot add _FOSSIL_-journal
ADDED  中文檔名.txt
</verbatim>

  *  Case 2:  If Chinese file name contains '\', It can not added to fossil repository.

<verbatim>
> 許檔名.txt


 磁碟區 C 中的磁碟沒有標籤。
 磁碟區序號:  2CA2-66A2

 的目錄

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

add .
cannot add _FOSSIL_
cannot add _FOSSIL_-journal
ADDED  中文檔名.txt
ADDED  ?檔名.txt

ci
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 \
.
cannot open for reading
SQLITE_BUSY: statement aborts at 2: [ROLLBACK] cannot rollbac
k transaction - SQL statements in progress
</verbatim>