mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
Android fix
This commit is contained in:
parent
cfd90cf54e
commit
1d24985aa6
2 changed files with 9 additions and 9 deletions
|
|
@ -394,7 +394,7 @@ static int StringRegexFind(const string& rex, asUINT start, asUINT& outLengthOfM
|
|||
// https://www.regular-expressions.info/stdregex.html
|
||||
//
|
||||
// std::wregex pattern(L"[[:alpha:]]+");
|
||||
// bool result = std::regex_match(std::wstring(L"abcdéfg"), pattern);
|
||||
// bool result = std::regex_match(std::wstring(L"abcd<EFBFBD>fg"), pattern);
|
||||
//
|
||||
// The solution from stack overflow doesn't work with MSVC
|
||||
// https://stackoverflow.com/questions/11254232/do-c11-regular-expressions-work-with-utf-8-strings
|
||||
|
|
@ -402,7 +402,7 @@ static int StringRegexFind(const string& rex, asUINT start, asUINT& outLengthOfM
|
|||
// std::locale old;
|
||||
// std::locale::global(std::locale("en_US.UTF-8"));
|
||||
// std::regex pattern("[[:alpha:]]+", std::regex_constants::extended);
|
||||
// bool result = std::regex_match(std::string(u8"abcdéfg"), pattern);
|
||||
// bool result = std::regex_match(std::string(u8"abcd<EFBFBD>fg"), pattern);
|
||||
//
|
||||
// I've tried setting the manifest to use utf8 code page but it also doesn't work with MSVC
|
||||
// https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
|
||||
|
|
@ -921,7 +921,7 @@ double parseFloat(const string &val, asUINT *byteCount)
|
|||
setlocale(LC_NUMERIC, "C");
|
||||
#endif
|
||||
#else
|
||||
#if !defined(ANDROID) && !defined(__psp2__)
|
||||
#if !defined(__ANDROID__) && !defined(__psp2__)
|
||||
// On Linux and other similar systems the threadsafe option is uselocale
|
||||
// ref: https://stackoverflow.com/questions/4057319/is-setlocale-thread-safe-function
|
||||
locale_t locale = newlocale(LC_NUMERIC_MASK, "C", NULL);
|
||||
|
|
@ -938,7 +938,7 @@ double parseFloat(const string &val, asUINT *byteCount)
|
|||
_configthreadlocale(oldConfig);
|
||||
#endif
|
||||
#else
|
||||
#if !defined(ANDROID) && !defined(__psp2__)
|
||||
#if !defined(__ANDROID__) && !defined(__psp2__)
|
||||
#endif
|
||||
uselocale(orig_locale);
|
||||
freelocale(locale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue