mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-10 00:11:43 +08:00
Restored lost files and changes in version 1.3.1 to depot.
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
#include "CArch.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#if HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#if HAVE_WCHAR_H || defined(_MSC_VER)
|
||||
# include <wchar.h>
|
||||
#elif __APPLE__
|
||||
@@ -56,6 +59,15 @@ static CArchMutex s_mutex = NULL;
|
||||
ARCH_STRING::ARCH_STRING()
|
||||
{
|
||||
s_mutex = ARCH->newMutex();
|
||||
|
||||
#if HAVE_LOCALE_H
|
||||
// see if we can convert a Latin-1 character
|
||||
char mb[MB_LEN_MAX];
|
||||
if (wctomb(mb, 0xe3) == -1) {
|
||||
// can't convert. try another locale so we can convert latin-1.
|
||||
setlocale(LC_CTYPE, "en_US");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ARCH_STRING::~ARCH_STRING()
|
||||
|
||||
Reference in New Issue
Block a user