0 Replies Latest reply on Jun 18, 2014 1:19 AM by 845b180d-3da9-43df-80ee-fa2133bd6f28

    Berkeley DB, Open Path Language Problem in C# (WPF)




      I have a problem with CreateDB and Open because DB File path of language.

      I am using Korean Language.(south korea).

      So I need to use necessary DB file named of korean.


      Here is my problem.


                   btreeConfig = new BTreeDatabaseConfig();

                   btreeConfig.Duplicates = DuplicatesPolicy.UNSORTED;

                   btreeConfig.ErrorPrefix = "fileDb";

                   btreeConfig.Creation = CreatePolicy.IF_NEEDED;

                   btreeConfig.CacheSize = new CacheInfo(0, 256 * 1024*1024, 1);//256MB

                   btreeConfig.PageSize = 64 * 1024;//64KB


                  System.Text.Encoding utf8 = System.Text.Encoding.UTF8;
                  byte[] utf8Bytes = utf8.GetBytes(dbFileName);
                  string decodedStringByUTF8 = utf8.GetString(utf8Bytes);

                  dbFileName = decodedStringByUTF8;
                  /* Create and open a new database in the file. */
                  try {
                      btreeDB = BTreeDatabase.Open(utf8.GetString(utf8Bytes), btreeConfig);
                  } catch (Exception e) {
                      Console.WriteLine("Error opening {0}.", dbFileName);
                      return -1;


      If dbFileName has a any korean word, exception will occured.(No such file or directory).


      This is my Big problem in currently.


      Is there any solution??