KivinChiu
Results
1
issues of
KivinChiu
我因为一些原因,必须在中文Windows下运行http服务,使用libhv时发现所有文件相关的方法是直接使用的标准库的方法,比如hv_exists、hlog的open这些,这些方法在中文windows下,由于系统的locale设置默认是中文936,系统会认为路径是gbk编码而不是utf8,导致无法读取中文路径,所有文件相关操作应该使用宽字符版本才可以正确操作。以hlog.c的打开日志文件句柄为例: #if (defined(OS_WIN) || defined(_WIN32)) //修正中文windows路径操作 wchar_t wstr[MAX_PATH]; MultiByteToWideChar(CP_UTF8, 0, logger->cur_logfile, -1, wstr, sizeof(wstr) / sizeof(wstr[0])); logger->fp_ = _wfopen(wstr, L"a"); #else logger->fp_ = fopen(logger->cur_logfile, "a"); #endif 又比如hbase中的hv_exists: ``` bool hv_exists(const...