kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #03327
Re: wxString.c_str()
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"emmedics4" <marco.serantoni@...>
-
Date:
Mon, 12 Oct 2009 14:31:01 -0000
-
In-reply-to:
<4AD3246B.40302@...>
-
User-agent:
eGroups-EW/0.82
--- In kicad-devel@xxxxxxxxxxxxxxx, Wayne Stambaugh <stambaughw@...>
> Has anyone tried using the (const wxChar *) cast operator? I've been
> using it in Printf and the logging function calls and it appears to work
> fine. It is just a typedef for wxString::const_pointer but it returns
> the correct character type depending on the character set used in
> wxWidgets. I like it because it is reasonably descriptive and it
> appears to work with most versions of wxWidgets. Using the example
> above, it is used as follows:
>
> s.Printf( wxT( "%s" ), (const wxChar*) formatMe );
>
> It also works with the gettext _() macro.
Indeed but wxChar is going to be wiped in new versions, i think Dick was talking taking in consideration a more long term approach: changing code style to enhance code longevity and issues tomorrow.
Please take a look to:
http://docs.wxwidgets.org/trunk/overview_unicode.html#overview_unicode_pitfalls
http://docs.wxwidgets.org/trunk/classwx_string.html#conv
--
Marco
Follow ups
References