liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Chinese file path #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.save a file path contained chinese using MBCS in std::string
2.passing this to leveldb::DB::Open(...)[ options.create_if_missing = true ];

What is the expected output? What do you see instead?
expected:
creating a new DB if not exist or open a DB if exist.

instead:

 assert(boost::filesystem::exists(fname)); [file : env_boost.cc line : 409 ] 
 this break assert.

What version of the product are you using? On what operating system?

version:  LevelDB 1.5.0     
system :  windows xp sp3

Please provide any additional information below.

the std::string using MBCS encoding cann't express all the character on 
Windows. Using std::wstring by encoding of UTF-16 or using std::string by 
encoding of UTF-8 is a solution on Windows.

Original issue reported on code.google.com by realwan...@gmail.com on 14 Jun 2012 at 6:02

GoogleCodeExporter commented 9 years ago
You should probably talk to whoever provided you with env_boost.cc, that 
doesn't come from leveldb itself.

Original comment by dgrogan@chromium.org on 15 Jun 2012 at 10:10