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