From a8139da38d533a1a7da7f6ca9bf3bbb44913662c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 26 Jan 2011 10:50:16 +0100 Subject: [PATCH] Try to use UTF8 only in kicad files --- include/macros.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/macros.h b/include/macros.h index 97dc86f984..35bcca9f27 100644 --- a/include/macros.h +++ b/include/macros.h @@ -7,10 +7,18 @@ #include +// comment this line to use old Kicad behavior (use local convention) +// uncomment this line to use UTF8 only convention in kicad files +#define USE_UTF8_ONLY #if wxUSE_UNICODE +#ifdef USE_UTF8_ONLY +#define CONV_TO_UTF8( wxstring ) ( (const char*) wxConvUTF8.cWX2MB( wxstring ) ) +#define CONV_FROM_UTF8( utf8string ) ( wxConvUTF8.cMB2WC( utf8string ) ) +#else #define CONV_TO_UTF8( wxstring ) ( (const char*) wxConvCurrent->cWX2MB( wxstring ) ) #define CONV_FROM_UTF8( utf8string ) ( wxConvCurrent->cMB2WC( utf8string ) ) +#endif #else #define CONV_TO_UTF8( wxstring ) ( (const char*) ( (wxstring).c_str() ) ) #define CONV_FROM_UTF8( utf8string ) (utf8string)