refactor: support UTF-8 file paths via std::filesystem (#359)

Rewrite file/path handling to use std::filesystem and UTF-8-safe helpers.
Switch Windows file open/create paths to wide-char APIs, replace manual
separator concatenation with PathJoin, and enable RocksDB UTF-8 filenames.

Also add UTF-8 path coverage for file IO, version manager recovery, and
collection open/flush/reopen flows.
This commit is contained in:
Jalin Wang
2026-05-08 17:44:22 +08:00
committed by GitHub
parent 68a497efdb
commit 1d4ae0b1b5
19 changed files with 937 additions and 432 deletions
+3 -1
View File
@@ -22,6 +22,7 @@
#include <typeinfo>
#include <zvec/ailego/encoding/json.h>
#include <zvec/ailego/logger/logger.h>
#include <zvec/ailego/utility/file_helper.h>
#include <zvec/ailego/utility/string_helper.h>
#include "db/sqlengine/common/util.h"
#include "tree/ParseTree.h"
@@ -118,7 +119,8 @@ std::string ZVecParser::to_formatted_string_tree(void *tree, void *parser) {
void ZVecParser::save_to_file(const std::string &file_name,
const std::string &formatted) {
std::ofstream outfile(file_name);
std::ofstream outfile;
ailego::FileHelper::OpenOfstream(outfile, file_name);
outfile << formatted;
outfile << std::endl;
outfile.close();