diff --git a/CMakeLists.txt b/CMakeLists.txt index 459b8d2..826f83f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_VERBOSE_MAKEFILE off) # version set(TARS_VERSION "1.1.0") set(PARSER_VERSION "${TARS_VERSION}") -set(GENERATOR_VERSION "20190510") +set(GENERATOR_VERSION "20190516") # namespace set(IDL_NAMESPACE Tars) diff --git a/build/tars2node b/build/tars2node index dfa0af0..be279f2 100755 Binary files a/build/tars2node and b/build/tars2node differ diff --git a/src/file_util.cpp b/src/file_util.cpp index ecddb92..4271b7f 100644 --- a/src/file_util.cpp +++ b/src/file_util.cpp @@ -19,11 +19,7 @@ void CodeGenerator::makeUTF8File(const string& sFileName, const string& sFileContent) { try { - char header[3] = {(char)(0xef), (char)(0xbb), (char)(0xbf)}; - - string sData(header, 3); - - sData += TC_Encoder::gbk2utf8(sFileContent); + string sData = TC_Encoder::gbk2utf8(sFileContent); TC_File::save2file(sFileName, sData.c_str()); } catch (...) {