1
This commit is contained in:
parent
98824e365b
commit
9ca75d71a9
@ -52,10 +52,15 @@ namespace behaviac {
|
||||
|
||||
char* loc = setlocale(LC_ALL, locale);
|
||||
|
||||
#if 1
|
||||
mbstowcs(buffer, str.c_str(), dwNum);
|
||||
ret = true;
|
||||
#else
|
||||
if (loc) {
|
||||
mbstowcs(buffer, str.c_str(), dwNum);
|
||||
ret = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
//restore
|
||||
setlocale(LC_ALL, currrentLocale);
|
||||
@ -108,10 +113,16 @@ namespace behaviac {
|
||||
|
||||
char* loc = setlocale(LC_ALL, locale);
|
||||
|
||||
#if 1
|
||||
wcstombs(buffer, wstr.c_str(), dwNum);
|
||||
ret = true;
|
||||
|
||||
#else
|
||||
if (loc) {
|
||||
wcstombs(buffer, wstr.c_str(), dwNum);
|
||||
ret = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
//restore
|
||||
setlocale(LC_ALL, currrentLocale);
|
||||
|
Loading…
x
Reference in New Issue
Block a user