Mercurial > dwindows
changeset 1615:38da4aa23b7c
Fix for Visual C giving errors on UTF-8 literals in source files.
Temporarily adding some UTF-8 strings in the test program to test cross platforms.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 26 Mar 2012 22:20:55 +0000 |
parents | 702de58e9ef8 |
children | bbef5d25efa0 |
files | dw.h dwtest.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dw.h Mon Mar 26 21:51:02 2012 +0000 +++ b/dw.h Mon Mar 26 22:20:55 2012 +0000 @@ -497,6 +497,13 @@ #endif #endif +/* With Visual C we need to make sure we are in UTF8 space + * to prevent compilation errors with UTF-8 encoded literals. + */ +#ifdef MSVC +#pragma execution_character_set("utf-8") +#endif + #define DW_DT_LEFT SS_LEFT #define DW_DT_QUERYEXTENT 0 #define DW_DT_UNDERSCORE 0
--- a/dwtest.c Mon Mar 26 21:51:02 2012 +0000 +++ b/dwtest.c Mon Mar 26 22:20:55 2012 +0000 @@ -1629,7 +1629,7 @@ dw_init(TRUE, argc, argv); /* Create our window */ - mainwindow = dw_window_new( HWND_DESKTOP, "dwindows test", flStyle | DW_FCF_SIZEBORDER | DW_FCF_MINMAX); + mainwindow = dw_window_new( HWND_DESKTOP, "dwindows test UTF8 中国語 (繁体) cañón", flStyle | DW_FCF_SIZEBORDER | DW_FCF_MINMAX); dw_window_set_icon(mainwindow, fileicon); menu_add();