Fix two bugs :

* ESCAPE_CHARS and UNESCAPE_CHARS were incomplete
    * Enable utf8 for widgets
This commit is contained in:
Grégory Soutadé 2011-11-16 15:47:49 +01:00
parent 76f7a70d1e
commit 7b8f6edff5
2 changed files with 4 additions and 2 deletions

View File

@ -30,6 +30,8 @@ std::vector<ExportEngine*> * KissCount::_exportEngines;
KissCount::KissCount(int argc, char** argv) : QApplication(argc, argv), _user(0)
{
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
_wxUI = new wxUI(this, "KissCount");
//_wxUI->SetLanguage(wxLocale::GetSystemLanguage());

View File

@ -32,7 +32,7 @@
#define APP_VERSION "0.3"
#define ESCAPE_CHARS(s) s = s.replace("\"", "\\\"");
#define ESCAPE_CHARS(s) s = s.replace("\"", "\\\""); s = s.replace("\'", "\\\'");
/*{ \
if (s.Find(wxT("\\\"")) == wxNOT_FOUND) \
s.Replace(wxT("\""), wxT("\\\""), true); \
@ -40,7 +40,7 @@
s.Replace(wxT("\'"), wxT("\\\'"), true); \
}
*/
#define UNESCAPE_CHARS(s) s = s.replace("\\\"", "\"");
#define UNESCAPE_CHARS(s) s = s.replace("\\\"", "\""); s = s.replace("\\\'", "\'");
/*{ \
s.Replace(wxT("\\\""), wxT("\""), true); \
s.Replace(wxT("\\\'"), wxT("\'"), true); \