From 899139012bc32c6e6bff29c0b3952ac58d06f7a4 Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 14 Jan 2025 12:46:42 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=AD=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.cpp | 8 ++++---- net/CMakeLists.txt | 2 +- ofen | 2 +- server/server.cpp | 2 +- util/CMakeLists.txt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/client.cpp b/client/client.cpp index 35c7e86..ec5d5b5 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -204,7 +204,7 @@ bool CClient::up_task(const std::string& param) } #ifdef _WIN32 - msg = CCodec::GBKTou8(msg); + msg = CCodec::ansi_to_u8(msg); #endif std::shared_ptr buf = std::make_shared(); @@ -235,7 +235,7 @@ bool CClient::down_one_file(const std::string& id, const std::string& file, cons { down_->cur_remote_id_ = id; #ifdef _WIN32 - down_->cur_remote_file_ = CCodec::u8ToGBK(file); + down_->cur_remote_file_ = CCodec::u8_to_ansi(file); #else down_->cur_remote_file_ = file; #endif @@ -492,7 +492,7 @@ void CClient::handle_frame(CFrameBuffer* buf) } if (real.find("[") == std::string::npos) { #ifdef _WIN32 - logger_->info("FILE ==> {}", CCodec::u8ToGBK(real)); + logger_->info("FILE ==> {}", CCodec::u8_to_ansi(real)); #else logger_->info("FILE ==> {}", real); #endif @@ -542,7 +542,7 @@ void CClient::handle_frame(CFrameBuffer* buf) std::lock_guard lock(mutex_); up_[buf->fid_] = std::make_shared(); #ifdef _WIN32 - up_[buf->fid_]->cur_file_ = CCodec::u8ToGBK(std::string(buf->data_, buf->len_)); + up_[buf->fid_]->cur_file_ = CCodec::u8_to_ansi(std::string(buf->data_, buf->len_)); #else up_[buf->fid_]->cur_file_ = std::string(buf->data_, buf->len_); #endif diff --git a/net/CMakeLists.txt b/net/CMakeLists.txt index c654387..a28622f 100644 --- a/net/CMakeLists.txt +++ b/net/CMakeLists.txt @@ -10,5 +10,5 @@ set(SOURCES net_base.h net_base.cpp ) add_library(trans_net STATIC ${SOURCES}) -target_link_libraries(trans_net PUBLIC Ofen trans_util) +target_link_libraries(trans_net PUBLIC ofen trans_util) target_include_directories(trans_net PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/ofen b/ofen index c2fb5d6..2be0e96 160000 --- a/ofen +++ b/ofen @@ -1 +1 @@ -Subproject commit c2fb5d6ed2bac563cd8db76a368d6269ecfb19dd +Subproject commit 2be0e9631729cf85e79b23fb921209182e0907be diff --git a/server/server.cpp b/server/server.cpp index d0069ad..e96d6cd 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -131,7 +131,7 @@ void CTcpServer::trans_data(CFrameBuffer* buf) case TYPE_UP_LIST: { std::string files_path = std::string(buf->data_, buf->len_); #ifdef _WIN32 - std::string turn_files_path = CCodec::u8ToGBK(files_path); + std::string turn_files_path = CCodec::u8_to_ansi(files_path); #else std::string turn_files_path(files_path); #endif diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index 945d23b..7585f0c 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -9,5 +9,5 @@ endif() set(SOURCES util.h util.cpp) add_library(trans_util STATIC ${SOURCES}) -target_link_libraries(trans_util PUBLIC Ofen) +target_link_libraries(trans_util PUBLIC ofen) target_include_directories(trans_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file