Skip to content

Commit f6fd36d

Browse files
committed
remove locale settings from DLL
1 parent 9f03f0f commit f6fd36d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

TexconvDLL/texassemble.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,9 +1107,6 @@ extern "C" __attribute__((visibility("default"))) int texassemble(int argc, wcha
11071107

11081108
std::wstring outputFile;
11091109

1110-
// Set locale for output since GetErrorDesc can get localized strings.
1111-
std::locale::global(std::locale(""));
1112-
11131110
HRESULT hr = S_OK;
11141111

11151112
// Process command line
@@ -2908,6 +2905,9 @@ extern "C" __attribute__((visibility("default"))) int texassemble(int argc, wcha
29082905
#ifdef _WIN32
29092906
int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
29102907
{
2908+
// Set locale for output since GetErrorDesc can get localized strings.
2909+
std::locale::global(std::locale(""));
2910+
29112911
bool verbose = true;
29122912
bool init_com = true;
29132913
#else

TexconvDLL/texconv.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,9 +1579,6 @@ extern "C" __attribute__((visibility("default"))) int texconv(int argc, wchar_t*
15791579
wchar_t szSuffix[MAX_PATH] = {};
15801580
std::filesystem::path outputDir;
15811581

1582-
// Set locale for output since GetErrorDesc can get localized strings.
1583-
std::locale::global(std::locale(""));
1584-
15851582
HRESULT hr = S_OK;
15861583

15871584
// Process command line
@@ -4226,6 +4223,9 @@ extern "C" __attribute__((visibility("default"))) int texconv(int argc, wchar_t*
42264223
#ifdef _WIN32
42274224
int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
42284225
{
4226+
// Set locale for output since GetErrorDesc can get localized strings.
4227+
std::locale::global(std::locale(""));
4228+
42294229
bool verbose = true;
42304230
bool init_com = true;
42314231
#else

0 commit comments

Comments
 (0)