← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Use Unicode macro for constant text

 

Le 05/09/2016 à 18:13, Simon Richter a écrit :
> This constant should be given as wchar_t const * in UNICODE builds on
> Windows, so use the _T() macro.

AFAIK, the current code is good (since wxWidgets 3.0) and works fine on Windows.
Moreover, _T() was just removed because it is discouraged ans confusing with _().
(see
http://docs.wxwidgets.org/trunk/group__group__funcmacro__string.html#ga7dfc2888539861afe6c4337ef315472b)

What issue are you fixing?

(for me, it is #if wxUSE_UNICODE which is useless)


> ---
>  common/dialog_about/aboutinfo.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/dialog_about/aboutinfo.h b/common/dialog_about/aboutinfo.h
> index df38e7c..8e19c59 100644
> --- a/common/dialog_about/aboutinfo.h
> +++ b/common/dialog_about/aboutinfo.h
> @@ -94,8 +94,8 @@ public:
>  
>  #if wxUSE_UNICODE
>          const wxString utf8_copyrightSign = wxString::FromUTF8( "\xc2\xa9" );
> -        copyrightText.Replace( "(c)", utf8_copyrightSign );
> -        copyrightText.Replace( "(C)", utf8_copyrightSign );
> +        copyrightText.Replace( _T( "(c)" ), utf8_copyrightSign );
> +        copyrightText.Replace( _T( "(C)" ), utf8_copyrightSign );
>  #endif // wxUSE_UNICODE
>  
>          return copyrightText;
> 


-- 
Jean-Pierre CHARRAS


References