Skip to content

Commit ccb4867

Browse files
committed
fixed:Displays incorrectly in other language systems
1 parent e620beb commit ccb4867

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/msbuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
uses: microsoft/setup-msbuild@v2
6565

6666
- name: Build Solution
67-
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
67+
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /property:CharacterSet=UTF-8
6868

6969
- name: Conditional Step for x86 Release
7070
if: matrix.configuration == 'Release' && matrix.platform == 'x86'

XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/Authorize_Hdr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifdef _WINDOWS
33
#include <Windows.h>
44
#include <tchar.h>
5+
#include <locale.h>
56
#include <minidumpapiset.h>
67
#else
78
#include <sys/types.h>

XEngine_Source/XEngine_APPService/XEngine_AuthorizeService/XEngine_AuthorizeService.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ int main(int argc, char** argv)
125125
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
126126

127127
SetUnhandledExceptionFilter(Coredump_ExceptionFilter);
128+
if (setlocale(LC_ALL, ".UTF8") == NULL)
129+
{
130+
fprintf(stderr, "Error setting locale.\n");
131+
return 1;
132+
}
128133
#endif
129134
bIsRun = true;
130135
int nRet = -1;

0 commit comments

Comments
 (0)