# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1332800455 0 # Node ID 38da4aa23b7cc74158b98aad206346a6e80a6b10 # Parent 702de58e9ef8cdf6821e76a8bea02d5933c3dd8e 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. diff -r 702de58e9ef8 -r 38da4aa23b7c dw.h --- 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 diff -r 702de58e9ef8 -r 38da4aa23b7c dwtest.c --- 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();