Skip to content

Commit

Permalink
Fixes issue Rhoban#8
Browse files Browse the repository at this point in the history
Set the process locale to UTF-8 on Windows using an embedded manifest. Note this only works on Windows 10 Version 1903 and later.
  • Loading branch information
combolek committed Mar 1, 2021
1 parent 3a33efc commit a75140d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_executable(plater-gui WIN32
about.cpp
icons.qrc
gui.rc
plater-gui.manifest
)

if(MSVC)
Expand Down
9 changes: 9 additions & 0 deletions gui/plater-gui.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="..." version="6.0.0.0"/>
<application>
<windowsSettings>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
</assembly>
2 changes: 1 addition & 1 deletion plater/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ endif()
target_include_directories(libplater PUBLIC .)
target_link_libraries(libplater PRIVATE Threads::Threads)

add_executable(plater "main.cpp")
add_executable(plater main.cpp plater.manifest)
if(MSVC)
target_compile_options(plater PRIVATE /wd4244)
endif()
Expand Down
9 changes: 9 additions & 0 deletions plater/plater.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity type="win32" name="..." version="6.0.0.0"/>
<application>
<windowsSettings>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
</assembly>

0 comments on commit a75140d

Please sign in to comment.