diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index b840b8cf7..c0637a057 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -80,6 +80,7 @@ Other changes:
- Examples: Vulkan: Use integrated GPU if nothing else is available. (#6359) [@kimidaisuki22]
- Examples: DX9, DX10, DX11: Queue framebuffer resize instead of processing in WM_SIZE,
as some drivers tends to only cleanup after existing the native resize modal loop. (#6374)
+- Examples: Updated all Visual Studio projects and batches to use /utf-8 argument.
-----------------------------------------------------------------------
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index c86179ccc..4af31f6f3 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -32,5 +32,5 @@ vcpkg integrate install ; register include / libs in Visual Studio
Build:
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. /I ..\..\backends main.cpp ..\..\backends\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /utf-8 /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. /I ..\..\backends main.cpp ..\..\backends\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
index 8c549b443..02f6a4741 100644
--- a/examples/example_allegro5/example_allegro5.vcxproj
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_glfw_opengl2/build_win32.bat b/examples/example_glfw_opengl2/build_win32.bat
index a0a75f906..24c0e08fd 100644
--- a/examples/example_glfw_opengl2/build_win32.bat
+++ b/examples/example_glfw_opengl2/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
index 82bdac221..2aa25506e 100644
--- a/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
+++ b/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 4ba58d8c9..b5979ad49 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_glfw.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
index 0a1c3d6be..4bd503afe 100644
--- a/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
+++ b/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_glfw_vulkan/build_win32.bat b/examples/example_glfw_vulkan/build_win32.bat
index 82f01112d..be9239816 100644
--- a/examples/example_glfw_vulkan/build_win32.bat
+++ b/examples/example_glfw_vulkan/build_win32.bat
@@ -7,8 +7,8 @@
@set OUT_DIR=Debug
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
@set OUT_DIR=Release
mkdir %OUT_DIR%
-cl /nologo /Zi /MD /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_glfw_vulkan/build_win64.bat b/examples/example_glfw_vulkan/build_win64.bat
index 0bf7936c6..c60b02789 100644
--- a/examples/example_glfw_vulkan/build_win64.bat
+++ b/examples/example_glfw_vulkan/build_win64.bat
@@ -6,8 +6,8 @@
@set OUT_DIR=Debug
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
@set OUT_DIR=Release
mkdir %OUT_DIR%
-cl /nologo /Zi /MD /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 /Ox /Oi %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
index 4eb8b7ce6..d0d1c5f88 100644
--- a/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
+++ b/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
@@ -92,6 +92,7 @@
Disabled
..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -107,6 +108,7 @@
Disabled
..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -125,6 +127,7 @@
..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -146,6 +149,7 @@
..\..;..\..\backends;%VULKAN_SDK%\include;..\libs\glfw\include;%(AdditionalIncludeDirectories)
false
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj
index 266ac04ed..c56452b26 100644
--- a/examples/example_glut_opengl2/example_glut_opengl2.vcxproj
+++ b/examples/example_glut_opengl2/example_glut_opengl2.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
$(GLUT_INCLUDE_DIR);..\..;..\..\backends;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_null/build_win32.bat b/examples/example_null/build_win32.bat
index 0cdfdc93b..be81d8093 100644
--- a/examples/example_null/build_win32.bat
+++ b/examples/example_null/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib
+cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib
diff --git a/examples/example_sdl2_directx11/build_win32.bat b/examples/example_sdl2_directx11/build_win32.bat
index 54f30fc96..f0b485ca6 100644
--- a/examples/example_sdl2_directx11/build_win32.bat
+++ b/examples/example_sdl2_directx11/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
index e6a57f6cd..c23800c9e 100644
--- a/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
+++ b/examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
@@ -92,6 +92,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -106,6 +107,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -123,6 +125,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -143,6 +146,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_sdl2_opengl2/build_win32.bat b/examples/example_sdl2_opengl2/build_win32.bat
index 287a418b7..7543edafc 100644
--- a/examples/example_sdl2_opengl2/build_win32.bat
+++ b/examples/example_sdl2_opengl2/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
index 08a6df9b9..036463f96 100644
--- a/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
+++ b/examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_sdl2_opengl3/README.md b/examples/example_sdl2_opengl3/README.md
index 9ecb9e90a..81fd9fe7b 100644
--- a/examples/example_sdl2_opengl3/README.md
+++ b/examples/example_sdl2_opengl3/README.md
@@ -10,10 +10,10 @@ Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) i
Use build_win32.bat or directly:
```
set SDL2_DIR=path_to_your_sdl2_folder
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
+# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
# or for 64-bit:
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
```
## Linux and similar Unixes
diff --git a/examples/example_sdl2_opengl3/build_win32.bat b/examples/example_sdl2_opengl3/build_win32.bat
index abbf3c78b..7b2fac922 100644
--- a/examples/example_sdl2_opengl3/build_win32.bat
+++ b/examples/example_sdl2_opengl3/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
index 21ce0693d..6a81c6770 100644
--- a/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
+++ b/examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_sdl2_sdlrenderer/README.md b/examples/example_sdl2_sdlrenderer/README.md
index 4fa37433c..0445bc4d9 100644
--- a/examples/example_sdl2_sdlrenderer/README.md
+++ b/examples/example_sdl2_sdlrenderer/README.md
@@ -5,10 +5,10 @@
```
set SDL2_DIR=path_to_your_sdl2_folder
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console
+# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
# or for 64-bit:
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console
```
- On Linux and similar Unixes
diff --git a/examples/example_sdl2_sdlrenderer/build_win32.bat b/examples/example_sdl2_sdlrenderer/build_win32.bat
index 1bae121bb..ca3f650cc 100644
--- a/examples/example_sdl2_sdlrenderer/build_win32.bat
+++ b/examples/example_sdl2_sdlrenderer/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj
index 35bcfe2ed..fdc85d8c3 100644
--- a/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj
+++ b/examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_sdl2_vulkan/build_win32.bat b/examples/example_sdl2_vulkan/build_win32.bat
index 5bc519856..8a4aefc22 100644
--- a/examples/example_sdl2_vulkan/build_win32.bat
+++ b/examples/example_sdl2_vulkan/build_win32.bat
@@ -7,4 +7,4 @@
@set OUT_DIR=Debug
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
index e5cbdc363..ba6afaf72 100644
--- a/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
+++ b/examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
@@ -92,6 +92,7 @@
Disabled
..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -107,6 +108,7 @@
Disabled
..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -125,6 +127,7 @@
..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -146,6 +149,7 @@
..\..;..\..\backends;%VULKAN_SDK%\include;%SDL2_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL2;%(AdditionalIncludeDirectories)
false
ImTextureID=ImU64;_MBCS;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_sdl3_opengl3/README.md b/examples/example_sdl3_opengl3/README.md
index 8b137b166..ab7f8e995 100644
--- a/examples/example_sdl3_opengl3/README.md
+++ b/examples/example_sdl3_opengl3/README.md
@@ -10,10 +10,10 @@ Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) i
Use build_win32.bat or directly:
```
set SDL2_DIR=path_to_your_sdl3_folder
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console
-# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console
+# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
# or for 64-bit:
-cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console
+cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console
```
## Linux and similar Unixes
diff --git a/examples/example_sdl3_opengl3/build_win32.bat b/examples/example_sdl3_opengl3/build_win32.bat
index ba7d25bcc..5b8d5f871 100644
--- a/examples/example_sdl3_opengl3/build_win32.bat
+++ b/examples/example_sdl3_opengl3/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib shell32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
+cl /nologo /Zi /MD /utf-8 %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console
diff --git a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
index a29e3afd2..051f87d76 100644
--- a/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
+++ b/examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
@@ -91,6 +91,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -105,6 +106,7 @@
Level4
Disabled
..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)
+ /utf-8 %(AdditionalOptions)
true
@@ -122,6 +124,7 @@
true
..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
@@ -142,6 +145,7 @@
true
..\..;..\..\backends;%SDL3_DIR%\include;$(VcpkgCurrentInstalledDir)include\SDL3;%(AdditionalIncludeDirectories)
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_win32_directx10/build_win32.bat b/examples/example_win32_directx10/build_win32.bat
index fd742239c..78a6e374d 100644
--- a/examples/example_win32_directx10/build_win32.bat
+++ b/examples/example_win32_directx10/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\backends\imgui_impl_dx10.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_win32_directx10/example_win32_directx10.vcxproj b/examples/example_win32_directx10/example_win32_directx10.vcxproj
index 2dc2333e0..d11aed883 100644
--- a/examples/example_win32_directx10/example_win32_directx10.vcxproj
+++ b/examples/example_win32_directx10/example_win32_directx10.vcxproj
@@ -87,6 +87,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);
+ /utf-8 %(AdditionalOptions)
true
@@ -100,6 +101,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);
+ /utf-8 %(AdditionalOptions)
true
@@ -116,6 +118,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);
false
+ /utf-8 %(AdditionalOptions)
true
@@ -134,6 +137,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_win32_directx11/build_win32.bat b/examples/example_win32_directx11/build_win32.bat
index b1cf7d1cb..c9a717c60 100644
--- a/examples/example_win32_directx11/build_win32.bat
+++ b/examples/example_win32_directx11/build_win32.bat
@@ -5,5 +5,5 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx11.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_win32_directx11/example_win32_directx11.vcxproj b/examples/example_win32_directx11/example_win32_directx11.vcxproj
index 3264f5095..bace6a2c8 100644
--- a/examples/example_win32_directx11/example_win32_directx11.vcxproj
+++ b/examples/example_win32_directx11/example_win32_directx11.vcxproj
@@ -86,6 +86,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);
+ /utf-8 %(AdditionalOptions)
true
@@ -99,6 +100,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);
+ /utf-8 %(AdditionalOptions)
true
@@ -115,6 +117,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);
false
+ /utf-8 %(AdditionalOptions)
true
@@ -133,6 +136,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_win32_directx11/main.cpp b/examples/example_win32_directx11/main.cpp
index c242a4ccb..d4d330575 100644
--- a/examples/example_win32_directx11/main.cpp
+++ b/examples/example_win32_directx11/main.cpp
@@ -1,4 +1,4 @@
-// Dear ImGui: standalone example application for DirectX 11
+// Dear ImGui: standalone example application for DirectX 11
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
// Read online: https://github.com/ocornut/imgui/tree/master/docs
@@ -26,7 +26,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
int main(int, char**)
{
// Create application window
- //ImGui_ImplWin32_EnableDpiAwareness();
+ ImGui_ImplWin32_EnableDpiAwareness();
WNDCLASSEXW wc = { sizeof(wc), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr };
::RegisterClassExW(&wc);
HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui DirectX11 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr);
@@ -71,7 +71,7 @@ int main(int, char**)
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
- //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese());
+ ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != nullptr);
// Our state
@@ -114,6 +114,12 @@ int main(int, char**)
if (show_demo_window)
ImGui::ShowDemoWindow(&show_demo_window);
+ ImGui::SeparatorText("CORRECT");
+ ImGui::DebugTextEncoding(u8"こんにちは");
+
+ ImGui::SeparatorText("INCORRECT");
+ ImGui::DebugTextEncoding("こんにちは");
+
// 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
{
static float f = 0.0f;
@@ -121,6 +127,13 @@ int main(int, char**)
ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+#define U8(_S) (const char*)u8##_S
+ ImGui::Text(U8("こんにちは"));
+
+//#pragma execution_character_set("utf-8")
+
+ ImGui::Text("日本語");
+
ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
ImGui::Checkbox("Another Window", &show_another_window);
diff --git a/examples/example_win32_directx12/build_win32.bat b/examples/example_win32_directx12/build_win32.bat
index 48dadb299..68e3c921e 100644
--- a/examples/example_win32_directx12/build_win32.bat
+++ b/examples/example_win32_directx12/build_win32.bat
@@ -6,4 +6,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx12.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
@set LIBS=d3d12.lib d3dcompiler.lib dxgi.lib
mkdir Debug
-cl /nologo /Zi /MD %INCLUDES% /D ImTextureID=ImU64 /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D ImTextureID=ImU64 /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_win32_directx12/example_win32_directx12.vcxproj b/examples/example_win32_directx12/example_win32_directx12.vcxproj
index 9e0737747..7b64371ef 100644
--- a/examples/example_win32_directx12/example_win32_directx12.vcxproj
+++ b/examples/example_win32_directx12/example_win32_directx12.vcxproj
@@ -88,6 +88,7 @@
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -102,6 +103,7 @@
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -118,6 +120,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
@@ -136,6 +139,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories)
ImTextureID=ImU64;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_win32_directx9/build_win32.bat b/examples/example_win32_directx9/build_win32.bat
index bbd4b13ca..ece5ea1ba 100644
--- a/examples/example_win32_directx9/build_win32.bat
+++ b/examples/example_win32_directx9/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_dx9.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
@set LIBS=/LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_win32_directx9/example_win32_directx9.vcxproj b/examples/example_win32_directx9/example_win32_directx9.vcxproj
index 44be2247b..8c3f99589 100644
--- a/examples/example_win32_directx9/example_win32_directx9.vcxproj
+++ b/examples/example_win32_directx9/example_win32_directx9.vcxproj
@@ -87,6 +87,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ /utf-8 %(AdditionalOptions)
true
@@ -100,6 +101,7 @@
Level4
Disabled
..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ /utf-8 %(AdditionalOptions)
true
@@ -116,6 +118,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
false
+ /utf-8 %(AdditionalOptions)
true
@@ -134,6 +137,7 @@
true
..\..;..\..\backends;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
false
+ /utf-8 %(AdditionalOptions)
true
diff --git a/examples/example_win32_opengl3/build_win32.bat b/examples/example_win32_opengl3/build_win32.bat
index 91cc6bec0..48df08087 100644
--- a/examples/example_win32_opengl3/build_win32.bat
+++ b/examples/example_win32_opengl3/build_win32.bat
@@ -5,4 +5,4 @@
@set SOURCES=main.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\backends\imgui_impl_win32.cpp ..\..\imgui*.cpp
@set LIBS=opengl32.lib
mkdir %OUT_DIR%
-cl /nologo /Zi /MD %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
+cl /nologo /Zi /MD /utf-8 %INCLUDES% /D UNICODE /D _UNICODE %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS%
diff --git a/examples/example_win32_opengl3/example_win32_opengl3.vcxproj b/examples/example_win32_opengl3/example_win32_opengl3.vcxproj
index 49023e3dc..98fc38fd3 100644
--- a/examples/example_win32_opengl3/example_win32_opengl3.vcxproj
+++ b/examples/example_win32_opengl3/example_win32_opengl3.vcxproj
@@ -87,6 +87,7 @@
Level4
Disabled
..\..;..\..\backends;
+ /utf-8 %(AdditionalOptions)
true
@@ -100,6 +101,7 @@
Level4
Disabled
..\..;..\..\backends;
+ /utf-8 %(AdditionalOptions)
true
@@ -116,6 +118,7 @@
true
..\..;..\..\backends;
false
+ /utf-8 %(AdditionalOptions)
true
@@ -134,6 +137,7 @@
true
..\..;..\..\backends;
false
+ /utf-8 %(AdditionalOptions)
true