On 13 Mar 2013, at 11:45am, Ercan Özdemir <eozdemi...@gmail.com> wrote:
> I have some applications in Windows 8 store using SQLite as database. > I discovered that if there are any non-English character in logged on > username, SQLite couldn't open datase file. > > Here is my test code: > > string dbPath = > Path.Combine(Windows.Storage.ApplicationData.Current.RoamingFolder.Path, > "test.db"); The value of "Windows.Storage.ApplicationData.Current.RoamingFolder.Path" includes the username. So if the user has non-Roman characters in their name, the path passed to "ne SQLite.SQLiteConnection()" will also include non-Roman characters in its name. I don't think "new SQLite.SQLiteConnection()" is handing your special characters correctly. This implies that dbPath contains text in a code page which is not Unicode. SQLite itself handles this by having a two ways to open a database file: one which expects UTF-8 and the other expects UTF-16. I don't know which one "new SQLite.SQLiteConnection()" calls. But you should be able to convert your dbPath value to UTF-8 or UTF-16 using some Operating system call, and pass the converted version of the path. Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users