8000 Fix windows unicode issues (#14757) · arangodb/arangodb@cd8d048 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd8d048

Browse files
mpoeterjsteemann
andauthored
Fix windows unicode issues (#14757)
Co-authored-by: Jan <jsteemann@users.noreply.github.com>
1 parent d33f9c8 commit cd8d048

File tree

6 files changed

+25
-0
lines changed

6 files changed

+25
-0
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
devel
22
-----
33

4+
* Fixed display of unicode characters in Windows console.
5+
6+
* Fixed issue BTS-531 "Error happens during EXE package installation if
7+
non-ASCII characters are present in target path".
8+
49
* Fix active failover, so that the new host actually has working
510
foxx services. (BTS-558)
611

arangod/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ endif()
11431143

11441144
add_executable(${BIN_ARANGOD}
11451145
RestServer/arangod.cpp
1146+
../cmake/activeCodePage.manifest
11461147
${ProductVersionFiles}
11471148
)
11481149

arangosh/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ endif ()
108108

109109
add_executable(${BIN_ARANGOBACKUP}
110110
${ProductVersionFiles_arangobackup}
111+
../cmake/activeCodePage.manifest
111112
Backup/BackupFeature.cpp
112113
Backup/arangobackup.cpp
113114
${ADDITIONAL_BIN_ARANGOBACKUP_SOURCES}
@@ -168,6 +169,7 @@ endif ()
168169

169170
add_executable(${BIN_ARANGODUMP}
170171
${ProductVersionFiles_arangodump}
172+
../cmake/activeCodePage.manifest
171173
Dump/DumpFeature.cpp
172174
Dump/arangodump.cpp
173175
${ADDITIONAL_BIN_ARANGODUMP_SOURCES}
@@ -226,6 +228,7 @@ endif ()
226228

227229
add_executable(${BIN_ARANGOEXPORT}
228230
${ProductVersionFiles_arangoexport}
231+
../cmake/activeCodePage.manifest
229232
Export/ExportFeature.cpp
230233
Export/arangoexport.cpp
231234
)
@@ -282,6 +285,7 @@ endif ()
282285

283286
add_executable(${BIN_ARANGOIMPORT}
284287
${ProductVersionFiles_arangoimport}
288+
../cmake/activeCodePage.manifest
285289
Import/AutoTuneThread.cpp
286290
Import/ImportFeature.cpp
287291
Import/ImportHelper.cpp
@@ -349,6 +353,7 @@ endif ()
349353

350354
add_executable(${BIN_ARANGORESTORE}
351355
${ProductVersionFiles_arangorestore}
356+
../cmake/activeCodePage.manifest
352357
Restore/RestoreFeature.cpp
353358
Restore/arangorestore.cpp
354359
${ADDITIONAL_BIN_ARANGORESTORE_SOURCES}
@@ -407,6 +412,7 @@ endif ()
407412

408413
add_executable(${BIN_ARANGOSH}
409414
${ProductVersionFiles_arangosh}
415+
../cmake/activeCodePage.manifest
410416
Import/AutoTuneThread.cpp
411417
Import/ImportHelper.cpp
412418
Import/SenderThread.cpp

cmake/activeCodePage.manifest

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
2+
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
3+
<application>
4+
<windowsSettings>
5+
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
6+
</windowsSettings>
7+
</application>
8+
</assembly>

lib/ApplicationFeatures/ShellColorsFeature.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ bool ShellColorsFeature::prepareConsole() {
134134
if (!SetConsoleMode(hStdout, handleMode)) {
135135
return false;
136136
}
137+
138+
// Set the codepage for the console output to UTF-8 so that unicode characters
139+
// are displayed correctly.
140+
SetConsoleOutputCP(CP_UTF8);
137141
return true;
138142
}
139143
#endif

tests/CMakeLists.txt

6AE7
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ endif ()
344344

345345
add_executable(
346346
arangodbtests
347+
../cmake/activeCodePage.manifest
347348
${ARANGODB_TESTS_SOURCES}
348349
${ARANGODB_REPLICATION2_TEST_SOURCES}
349350
main.cpp

0 commit comments

Comments
 (0)
0