User Tools

Site Tools


wiki:wxstring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:wxstring [2010/01/05 13:27]
mariuz
wiki:wxstring [2014/12/09 09:32] (current)
mariuz
Line 3: Line 3:
 FlameRobin uses two kinds of strings: standard C++ std::string provided by STL and wxString class provided by wxWidgets. FlameRobin uses two kinds of strings: standard C++ std::string provided by STL and wxString class provided by wxWidgets.
  
-Please note that wxString is the prefered class to use in entire system. It has a lot of features and provides good support for various character sets. It is easy to use non-ascii characters with it. IBPP library that we use for database access uses std::​string. So, when we retrieve and set string data, we need to convert wxString to std::string and vice versa. To do this properly, we use functions wx2std and std2wx. That way strings are translated properly in both Unicode ​and ANSI builds.+Please note that wxString is the prefered class to use in entire system. It has a lot of features and provides good support for various character sets. It is easy to use non-ascii characters with it. IBPP library that we use for database access uses std::​string. So, when we retrieve and set string data, we need to convert wxString to std::string and vice versa. To do this properly, we use functions wx2std and std2wx. That way strings are translated properly in both Unicode builds.
  
 **NOTE:** When the second parameter to //​wx2std()//​ and //​std2wx()//​ (charset conversion object) is not given, then the default system converter is used. This will break when converting identifiers and other text read from the database or intended to be sent to the database, as the conversion object for the database character set is not necessarily the same as the conversion object for the system encoding. **NOTE:** When the second parameter to //​wx2std()//​ and //​std2wx()//​ (charset conversion object) is not given, then the default system converter is used. This will break when converting identifiers and other text read from the database or intended to be sent to the database, as the conversion object for the database character set is not necessarily the same as the conversion object for the system encoding.
wiki/wxstring.txt ยท Last modified: 2014/12/09 09:32 by mariuz