add shit
This commit is contained in:
@ -1,17 +1,19 @@
|
||||
#include "IOHelper.hpp"
|
||||
#if YYCC_OS == YYCC_OS_WINDOWS
|
||||
|
||||
#include "EncodingHelper.hpp"
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
namespace YYCC::IOHelper {
|
||||
|
||||
void GetCmdLine(std::string& u8cmd) {
|
||||
void Gets(std::string& u8cmd) {
|
||||
std::wstring wcmd;
|
||||
std::getline(std::wcin, wcmd);
|
||||
YYCC::EncodingHelper::WcharToChar(wcmd, u8cmd, CP_UTF8);
|
||||
}
|
||||
|
||||
FILE* UTF8FOpen(const char* u8_filepath, const char* u8_mode) {
|
||||
FILE* FOpen(const char* u8_filepath, const char* u8_mode) {
|
||||
std::wstring wmode, wpath;
|
||||
bool suc = YYCC::EncodingHelper::CharToWchar(u8_mode, wmode, CP_UTF8);
|
||||
suc = suc && YYCC::EncodingHelper::CharToWchar(u8_filepath, wpath, CP_UTF8);
|
||||
@ -25,3 +27,5 @@ namespace YYCC::IOHelper {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user