Blob Blame History Raw
--- bochs-2.2.6/gui/wx.cc.wx26	2006-01-23 19:34:47.000000000 +0100
+++ bochs-2.2.6/gui/wx.cc	2006-02-16 19:02:56.000000000 +0100
@@ -189,12 +189,12 @@
   if (fromToolbar && first_enable && en) {
     // only show this help if you click on the toolbar.  If they already
     // know the shortcut, don't annoy them with the message.
-    wxString msg = 
+    wxString msg = wxT(
       "You have enabled the mouse in Bochs, so now your mouse actions will\n"
       "be sent into the simulator.  The usual mouse cursor will be trapped\n"
       "inside the Bochs window until you press a CTRL key + the middle button\n"
-      "to turn mouse capture off.";
-    wxMessageBox(msg, "Mouse Capture Enabled", wxOK | wxICON_INFORMATION);
+      "to turn mouse capture off.");
+    wxMessageBox(msg, wxT("Mouse Capture Enabled"), wxOK | wxICON_INFORMATION);
     first_enable = false;
   }
   enable->set (en);
@@ -1050,10 +1050,10 @@
         strcpy(status_text+1, statusitem_text[i]);
         theFrame->SetStatusText(status_text, i+1);
 #else
-        theFrame->SetStatusText(statusitem_text[i], i+1);
+        theFrame->SetStatusText(wxString(statusitem_text[i], wxConvUTF8), i+1);
 #endif
       } else {
-        theFrame->SetStatusText("", i+1);
+        theFrame->SetStatusText(wxT(""), i+1);
       }
     }
   } else if ((unsigned)element < statusitem_count) {
@@ -1063,10 +1063,11 @@
         strcpy(status_text+1, statusitem_text[element]);
         theFrame->SetStatusText(status_text, element+1);
 #else
-      theFrame->SetStatusText(statusitem_text[element], element+1);
+      theFrame->SetStatusText(wxString(statusitem_text[element], wxConvUTF8),
+        element+1);
 #endif
     } else {
-      theFrame->SetStatusText("", element+1);
+      theFrame->SetStatusText(wxT(""), element+1);
     }
   }
 }
@@ -1599,7 +1600,7 @@
       wxString str = data.GetText ();
       int len = str.Len ();
       Bit8u *buf = new Bit8u[len];
-      memcpy (buf, str.c_str (), len);
+      memcpy (buf, str.mb_str(wxConvUTF8), len);
       *bytes = buf;
       *nbytes = len;
       ret = 1;
@@ -1620,7 +1621,7 @@
   wxMutexGuiEnter ();
   int ret = 0;
   if (wxTheClipboard->Open ()) {
-    wxString string (text_snapshot, len);
+    wxString string (text_snapshot, wxConvUTF8, len);
     wxTheClipboard->SetData (new wxTextDataObject (string));
     wxTheClipboard->Close ();
     ret = 1;
--- bochs-2.2.6/gui/wxdialog.cc.wx26	2005-11-26 10:22:58.000000000 +0100
+++ bochs-2.2.6/gui/wxdialog.cc	2006-02-16 20:27:56.000000000 +0100
@@ -80,12 +80,12 @@
 {
   for (int i=0; i<N_BUTTONS; i++) enabled[i] = TRUE;
   vertSizer = new wxBoxSizer(wxVERTICAL);
-  context = new wxStaticText (this, -1, "");
+  context = new wxStaticText (this, -1, wxT(""));
   wxFont font = context->GetFont ();
   font.SetWeight (wxBOLD);
   font.SetPointSize (2 + font.GetPointSize ());
   context->SetFont (font);
-  message = new wxStaticText (this, -1, "");
+  message = new wxStaticText (this, -1, wxT(""));
   message->SetFont (font);
   dontAsk = new wxCheckBox (this, -1, LOG_MSG_DONT_ASK_STRING);
   btnSizer = new wxBoxSizer(wxHORIZONTAL);
@@ -99,33 +99,29 @@
 }
 
 void LogMsgAskDialog::SetContext (wxString s) {
-  wxString text;
-  text.Printf (LOG_MSG_CONTEXT, s.c_str ());
-  ChangeStaticText (vertSizer, context, text);
+  ChangeStaticText (vertSizer, context, wxString(LOG_MSG_CONTEXT) + s);
 }
 
 void LogMsgAskDialog::SetMessage (wxString s) {
-  wxString text;
-  text.Printf (LOG_MSG_MSG, s.c_str ());
-  ChangeStaticText (vertSizer, message, text);
+  ChangeStaticText (vertSizer, context, wxString(LOG_MSG_MSG) + s);
 }
 
 void LogMsgAskDialog::Init ()
 {
   static const int ids[N_BUTTONS] = LOG_MSG_ASK_IDS;
-  static const char *names[N_BUTTONS] = LOG_MSG_ASK_NAMES;
+  static const wxString names[N_BUTTONS] = LOG_MSG_ASK_NAMES;
   for (int i=0; i<N_BUTTONS; i++) {
     if (!enabled[i]) continue;
     wxButton *btn = new wxButton (this, ids[i], names[i]);
     btnSizer->Add (btn, 1, wxALL, 5);
   }
   wxSize ms = message->GetSize ();
-  wxLogMessage ("message size is %d,%d", ms.GetWidth(), ms.GetHeight ());
+  // wxLogMessage (wxT("message size is %d,%d"), ms.GetWidth(), ms.GetHeight ());
   SetAutoLayout(TRUE);
   SetSizer(vertSizer);
   vertSizer->Fit (this);
   wxSize size = vertSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 10;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -147,7 +143,7 @@
     default:
       return;  // without EndModal
   }
-  wxLogMessage ("you pressed button id=%d, return value=%d", id, ret);
+  // wxLogMessage (wxT("you pressed button id=%d, return value=%d"), id, ret);
   EndModal (ret);
 }
 
@@ -191,7 +187,7 @@
 FloppyConfigDialog::FloppyConfigDialog(
     wxWindow* parent,
     wxWindowID id)
-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
   validate = NULL;
@@ -216,19 +212,19 @@
   capacitySizer->Add (captext, 0, wxALL, 5);
   capacitySizer->Add (capacity, 0, wxALL|wxADJUST_MINSIZE, 5);
   // contents of buttonSizer
-  btn = new wxButton (this, wxID_HELP, "Help");
+  btn = new wxButton (this, wxID_HELP, wxT("Help"));
   buttonSizer->Add (btn, 0, wxALL, 5);
   // use wxID_CANCEL because pressing ESC produces this same code
-  btn = new wxButton (this, wxID_CANCEL, "Cancel");
+  btn = new wxButton (this, wxID_CANCEL, wxT("Cancel"));
   buttonSizer->Add (btn, 0, wxALL, 5);
-  CreateBtn = new wxButton (this, ID_Create, "Create Image");
+  CreateBtn = new wxButton (this, ID_Create, wxT("Create Image"));
   buttonSizer->Add (CreateBtn, 0, wxALL, 5);
-  btn = new wxButton (this, wxID_OK, "Ok");
+  btn = new wxButton (this, wxID_OK, wxT("Ok"));
   buttonSizer->Add (btn, 0, wxALL, 5);
   // create filename and diskImageRadioBtn so that we can tweak them before
   // Init comes.  However don't add it to any sizer yet because it needs to go
   // in after the last radio button.
-  filename = new wxTextCtrl (this, ID_FilenameText, "", wxDefaultPosition, longTextSize);
+  filename = new wxTextCtrl (this, ID_FilenameText, wxT(""), wxDefaultPosition, longTextSize);
   diskImageRadioBtn = new wxRadioButton (this, ID_Filename, FLOPPY_CONFIG_DISKIMG);
 
   // the radioSizer contents will be added by successive calls to
@@ -240,7 +236,7 @@
     const wxString& filename)
 {
   if (n_rbtns >= FLOPPY_MAX_RBTNS) {
-    wxLogError ("AddRadio failed: increase FLOPPY_MAX_RBTNS in wxdialog.h");
+    wxLogError (wxT("AddRadio failed: increase FLOPPY_MAX_RBTNS in wxdialog.h"));
     return;
   }
   rbtn[n_rbtns] = new wxRadioButton (this, -1, description);
@@ -250,17 +246,15 @@
 }
 
 void FloppyConfigDialog::SetDriveName (wxString name) {
-  wxString text;
-  text.Printf (FLOPPY_CONFIG_TITLE, name.c_str ());
-  SetTitle (text);
-  text.Printf (FLOPPY_CONFIG_INSTRS, name.c_str ());
-  ChangeStaticText (vertSizer, instr, text);
+  SetTitle (wxString(FLOPPY_CONFIG_TITLE) + name);
+  ChangeStaticText (vertSizer, instr, wxString(FLOPPY_CONFIG_INSTRS) + name +
+    wxT("."));
 }
 
 void FloppyConfigDialog::SetCapacityChoices (int n, char *choices[])
 {
   for (int i=0; i<n; i++)
-    capacity->Append (wxString (choices[i]));
+    capacity->Append (wxString (choices[i], wxConvUTF8));
 }
 
 void FloppyConfigDialog::SetCapacity (int cap)
@@ -282,7 +276,7 @@
   SetSizer(vertSizer);
   vertSizer->Fit (this);
   wxSize size = vertSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 5;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -298,7 +292,7 @@
   if (diskImageRadioBtn->GetValue ()) {
     return i;
   }
-  wxLogError ("GetRadio() found nothing selected");
+  wxLogError (wxT("GetRadio() found nothing selected"));
   return 0;
 }
 
@@ -315,7 +309,7 @@
   // search equivalentFilename[] for matches. if it matches, select the
   // radio button instead.
   for (int i=0; i<n_rbtns; i++) {
-    if (!strcmp (f.c_str (), equivalentFilename[i])) {
+    if (!f.Cmp(equivalentFilename[i])) {
       rbtn[i]->SetValue (TRUE);
       return;  // leaving filename text field unchanged
     }
@@ -331,7 +325,7 @@
   if (n < n_rbtns) {
     return equivalentFilename[n];
   } else {
-    return filename->GetValue ().c_str ();
+    return filename->GetValue ();
   }
 }
 
@@ -352,7 +346,7 @@
       break;
     case ID_Browse:
       if (BrowseTextCtrl(filename)) {
-        capacity->SetSelection(capacity->FindString("auto"));
+        capacity->SetSelection(capacity->FindString(wxT("auto")));
       }
       break;
     case ID_Capacity:
@@ -365,13 +359,15 @@
       {
         int cap = capacity->GetSelection ();
         char name[1024];
-        strncpy (name, filename->GetValue ().c_str (), sizeof(name));
+        strncpy (name, filename->GetValue ().mb_str(wxConvUTF8), sizeof(name));
+        name[sizeof(name)-1] = 0;
         if (CreateImage (0, floppy_type_n_sectors[cap], name)) {
-          wxString msg;
-          msg.Printf ("Created a %s disk image called '%s'.",
-            capacity->GetString (cap).c_str (), 
-            filename->GetValue ().c_str ());
-          wxMessageBox(msg, "Image Created", wxOK | wxICON_INFORMATION, this);
+          wxString msg(wxT("Created a "));
+          msg += capacity->GetString (cap);
+          msg += wxT("disk image called '");
+          msg += filename->GetValue ();
+          msg += wxT("'."),
+          wxMessageBox(msg, wxT("Image Created"), wxOK | wxICON_INFORMATION, this);
         }
       }
       break;
@@ -429,10 +425,10 @@
 LogOptionsDialog::LogOptionsDialog(
     wxWindow* parent,
     wxWindowID id)
-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
-  static char *names[] = LOG_OPTS_TYPE_NAMES;
+  static const wxString names[] = LOG_OPTS_TYPE_NAMES;
   SetTitle (LOG_OPTS_TITLE);
   vertSizer = new wxBoxSizer (wxVERTICAL);
   // top level objects
@@ -452,7 +448,7 @@
   // logfileSizer contents
   text = new wxStaticText (this, -1, LOG_OPTS_LOGFILE);
   logfileSizer->Add (text);
-  logfile = new wxTextCtrl (this, -1, "", wxDefaultPosition, longTextSize);
+  logfile = new wxTextCtrl (this, -1, wxT(""), wxDefaultPosition, longTextSize);
   logfileSizer->Add (logfile);
   wxButton *btn = new wxButton (this, ID_Browse, BTNLABEL_BROWSE);
   logfileSizer->Add (btn, 0, wxALL, 5);
@@ -460,7 +456,7 @@
   // debuggerlogfileSizer contents
   text = new wxStaticText (this, -1, LOG_OPTS_DEBUGGER_LOGFILE);
   debuggerlogfileSizer->Add (text);
-  debuggerlogfile = new wxTextCtrl (this, -1, "", wxDefaultPosition, longTextSize);
+  debuggerlogfile = new wxTextCtrl (this, -1, wxT(""), wxDefaultPosition, longTextSize);
   debuggerlogfileSizer->Add (debuggerlogfile);
   btn = new wxButton (this, ID_Browse2, BTNLABEL_BROWSE);
   debuggerlogfileSizer->Add (btn, 0, wxALL, 5);
@@ -490,7 +486,7 @@
   SetSizer(vertSizer);
   vertSizer->Fit (this);
   wxSize size = vertSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 5;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -511,7 +507,7 @@
   }
   // this can happen if one of the choices that is excluded by
   // LOG_OPTS_EXCLUDE() is used, for example.
-  wxLogDebug ("SetAction type=%d a=%d not found", evtype, a);
+  wxLogDebug (wxT("SetAction type=%d a=%d not found"), evtype, a);
 }
 
 int LogOptionsDialog::GetAction (int evtype) {
@@ -524,7 +520,7 @@
 void LogOptionsDialog::OnEvent(wxCommandEvent& event)
 {
   int id = event.GetId ();
-  wxLogMessage ("you pressed button id=%d", id);
+  // wxLogMessage (wxT("you pressed button id=%d"), id);
   switch (id) {
     case ID_Browse:
       BrowseTextCtrl (logfile);
@@ -586,11 +582,11 @@
 AdvancedLogOptionsDialog::AdvancedLogOptionsDialog(
     wxWindow* parent,
     wxWindowID id)
-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
   //static int integers[LOG_OPTS_N_CHOICES_NORMAL] = {0, 1, 2, 3};
-  static char *names[] = ADVLOG_OPTS_TYPE_NAMES;
+  static const wxString names[] = ADVLOG_OPTS_TYPE_NAMES;
   SetTitle (ADVLOG_OPTS_TITLE);
   vertSizer = new wxBoxSizer (wxVERTICAL);
   // top level objects
@@ -608,7 +604,7 @@
   // logfileSizer contents
   text = new wxStaticText (this, -1, ADVLOG_OPTS_LOGFILE);
   logfileSizer->Add (text);
-  logfile = new wxTextCtrl (this, -1, "", wxDefaultPosition, longTextSize);
+  logfile = new wxTextCtrl (this, -1, wxT(""), wxDefaultPosition, longTextSize);
   logfileSizer->Add (logfile);
   wxButton *btn = new wxButton (this, ID_Browse, BTNLABEL_BROWSE);
   logfileSizer->Add (btn, 0, wxALL, 5);
@@ -619,7 +615,7 @@
   gridSizer = new wxGridSizer (ADVLOG_OPTS_N_TYPES + 1);
   // add title row
   int typemax = ADVLOG_OPTS_N_TYPES;
-  text = new wxStaticText (scrollPanel, -1, "Device");
+  text = new wxStaticText (scrollPanel, -1, wxT("Device"));
   gridSizer->Add (text, 0, wxALIGN_CENTER);
   int type;
   for (type=0; type < typemax; type++) {
@@ -632,7 +628,7 @@
   for (int dev=0; dev<devmax; dev++) {
     action[dev] = new wxChoice* [ADVLOG_OPTS_N_TYPES];
     // name of device in first column
-    gridSizer->Add (new wxStaticText (scrollPanel, -1, SIM->get_prefix (dev)));
+    gridSizer->Add (new wxStaticText (scrollPanel, -1, wxString(SIM->get_prefix (dev), wxConvUTF8)));
     // wxChoice in every other column
     for (type=0; type < typemax; type++) {
       action[dev][type] = makeLogOptionChoiceBox (scrollPanel, -1, type);
@@ -689,7 +685,7 @@
   SetSizer(vertSizer);
   vertSizer->Fit (this);
   wxSize size = vertSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 5;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -697,7 +693,7 @@
 
 void AdvancedLogOptionsDialog::CopyParamToGui () {
   bx_param_string_c *logfile = SIM->get_param_string (BXP_LOG_FILENAME);
-  SetLogfile (wxString (logfile->getptr ()));
+  SetLogfile (wxString (logfile->getptr (), wxConvUTF8));
   // copy log action settings from siminterface to gui
   int dev, ndev = SIM->get_n_log_modules ();
   int type, ntype = SIM->get_max_log_level ();
@@ -739,7 +735,7 @@
   }
   // this can happen if one of the choices that is excluded by
   // ADVLOG_OPTS_EXCLUDE() is used, for example.
-  wxLogDebug ("warning: SetAction type=%d act=%d not found", evtype, act);
+  wxLogDebug (wxT("warning: SetAction type=%d act=%d not found"), evtype, act);
 }
 
 int AdvancedLogOptionsDialog::GetAction (int dev, int evtype) {
@@ -752,7 +748,7 @@
 void AdvancedLogOptionsDialog::OnEvent(wxCommandEvent& event)
 {
   int id = event.GetId ();
-  wxLogMessage ("you pressed button id=%d", id);
+  // wxLogMessage (wxT("you pressed button id=%d"), id);
   switch (id) {
     case ID_Browse:
       BrowseTextCtrl (logfile);
@@ -821,14 +817,14 @@
 DebugLogDialog::DebugLogDialog(
     wxWindow* parent,
     wxWindowID id)
-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
   lengthMax = DEBUG_LOG_DEFAULT_LENGTH_MAX;
   lengthTolerance = DEBUG_LOG_DEFAULT_TOLERANCE;
   SetTitle (DEBUG_LOG_TITLE);
   mainSizer = new wxBoxSizer (wxVERTICAL);
-  log = new wxTextCtrl (this, -1, "",
+  log = new wxTextCtrl (this, -1, wxT(""),
       wxDefaultPosition, wxSize(400, 300), 
       wxTE_MULTILINE | wxTE_RICH | wxTE_READONLY);
   mainSizer->Add (log, 1, wxALL|wxGROW, 10);
@@ -840,7 +836,7 @@
   mainSizer->Add (buttonSizer, 0, wxALIGN_RIGHT);
 
   // commandSizer contents
-  command = new wxTextCtrl (this, ID_DebugCommand, "", 
+  command = new wxTextCtrl (this, ID_DebugCommand, wxT(""), 
       wxDefaultPosition, wxDefaultSize, 
       wxTE_PROCESS_ENTER);
   commandSizer->Add (command, 1, wxGROW);
@@ -860,7 +856,7 @@
   SetSizer(mainSizer);
   mainSizer->Fit (this);
   wxSize size = mainSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 5;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -939,7 +935,7 @@
 
 void DebugLogDialog::OnKeyEvent(wxKeyEvent& event)
 {
-  wxLogDebug ("key event");
+  wxLogDebug (wxT("key event"));
 }
 #endif
 
@@ -958,7 +954,7 @@
 ParamDialog::ParamDialog(
     wxWindow* parent,
     wxWindowID id)
-  : wxDialog (parent, id, "", wxDefaultPosition, wxDefaultSize, 
+  : wxDialog (parent, id, wxT(""), wxDefaultPosition, wxDefaultSize, 
     wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
 {
   idHash = new wxHashTable (wxKEY_INTEGER);
@@ -1016,7 +1012,7 @@
   SetSizer(mainSizer);
   mainSizer->Fit (this);
   wxSize size = mainSizer->GetMinSize ();
-  wxLogMessage ("minsize is %d,%d", size.GetWidth(), size.GetHeight ());
+  // wxLogMessage (wxT("minsize is %d,%d"), size.GetWidth(), size.GetHeight ());
   int margin = 5;
   SetSizeHints (size.GetWidth () + margin, size.GetHeight () + margin);
   Center ();
@@ -1071,7 +1067,8 @@
   wxASSERT (context->vertSizer != NULL);
   if (param_generic == NULL) 
     return;  // param not registered, probably this option was not compiled in
-  wxLogDebug ("AddParam for param '%s'", param_generic->get_name ());
+  wxLogDebug (wxString(wxT("AddParam for param '")) +
+    wxString(param_generic->get_name (), wxConvUTF8) + wxT("'"));
   if (context->gridSizer == NULL) {
     // create a gridSizer if none exists yet.  add it to default vertSizer.  
     context->gridSizer = new wxFlexGridSizer (3);
@@ -1090,14 +1087,14 @@
   if (!prompt) prompt = pstr->param->get_name ();
   char *description = pstr->param->get_description ();
   wxASSERT (prompt != NULL);
-#define ADD_LABEL(x) sizer->Add (pstr->label = new wxStaticText (context->parent, -1, wxString (x)), 0, wxALIGN_RIGHT|wxALL, 3)
+#define ADD_LABEL(x) sizer->Add (pstr->label = new wxStaticText (context->parent, -1, wxString (x, wxConvUTF8)), 0, wxALIGN_RIGHT|wxALL, 3)
   switch (type) {
     case BXT_PARAM_BOOL: {
 	bx_param_bool_c *param = (bx_param_bool_c*) param_generic;
 	if (!plain) ADD_LABEL (prompt);
-	wxCheckBox *ckbx = new wxCheckBox (context->parent, pstr->id, "");
+	wxCheckBox *ckbx = new wxCheckBox (context->parent, pstr->id, wxT(""));
 	ckbx->SetValue (param->get ());
-        if (description) ckbx->SetToolTip(description);
+        if (description) ckbx->SetToolTip(wxString(description, wxConvUTF8));
 	sizer->Add (ckbx, 0, wxALL, 2);
 	if (!plain) sizer->Add (1, 1);  // spacer
 	pstr->u.checkbox = ckbx;
@@ -1113,17 +1110,17 @@
           spinctrl->SetValue (param->get ());
           int max = (param->get_max () < (1<<24))?param->get_max ():(1<<24)-1;
           spinctrl->SetRange (param->get_min (), SPINCTRL_FIX_MAX (max));
-          if (description) spinctrl->SetToolTip(description);
+          if (description) spinctrl->SetToolTip(wxString(description, wxConvUTF8));
           sizer->Add (spinctrl, 0, wxALL, 2);
           if (!plain) sizer->Add (1, 1);  // spacer
           pstr->u.spin = spinctrl;
         } else {
-          wxTextCtrl *textctrl = new wxTextCtrl (context->parent, pstr->id, "", wxDefaultPosition, normalTextSize);
+          wxTextCtrl *textctrl = new wxTextCtrl (context->parent, pstr->id, wxT(""), wxDefaultPosition, normalTextSize);
           const char *format = param->get_format ();
           if (!format)
             format = strdup(param->get_base () == 16 ? "0x%X" : "%d");
           SetTextCtrl (textctrl, format, param->get ());
-          if (description) textctrl->SetToolTip(description);
+          if (description) textctrl->SetToolTip(wxString(description, wxConvUTF8));
           sizer->Add (textctrl, 0, wxALL, 2);
           if (!plain) sizer->Add (1, 1);  // spacer
           pstr->u.text = textctrl;
@@ -1136,14 +1133,14 @@
 	bx_param_enum_c *param = (bx_param_enum_c*) param_generic;
 	if (!plain) ADD_LABEL (prompt);
 	wxChoice *choice = new wxChoice (context->parent, pstr->id);
-        if (description) choice->SetToolTip(description);
+        if (description) choice->SetToolTip(wxString(description, wxConvUTF8));
 	sizer->Add (choice, 0, wxADJUST_MINSIZE, 2);
 	if (!plain) sizer->Add (1, 1);  // spacer
 	// fill in the choices
 	int i=0;
 	char *ptr;
 	while (NULL != (ptr = param->get_choice (i++)))
-	  choice->Append (ptr);
+	  choice->Append (wxString(ptr, wxConvUTF8));
 	choice->SetSelection (param->get() - param->get_min ());
 	pstr->u.choice = choice;
 	idHash->Put (pstr->id, pstr);
@@ -1154,8 +1151,8 @@
 	bx_param_string_c *param = (bx_param_string_c*) param_generic;
 	if (!plain) ADD_LABEL (prompt);
 	bool isFilename = param->get_options ()->get () & param->IS_FILENAME;
-	wxTextCtrl *txtctrl = new wxTextCtrl (context->parent, pstr->id, "", wxDefaultPosition, isFilename? longTextSize : normalTextSize);
-        if (description) txtctrl->SetToolTip(description);
+	wxTextCtrl *txtctrl = new wxTextCtrl (context->parent, pstr->id, wxT(""), wxDefaultPosition, isFilename? longTextSize : normalTextSize);
+        if (description) txtctrl->SetToolTip(wxString(description, wxConvUTF8));
         if (param->get_options()->get () & param->RAW_BYTES) {
           char *value = param->getptr ();
           wxString buffer;
@@ -1164,12 +1161,14 @@
           sep_string[1] = 0;
           for (int i=0; i<param->get_maxsize (); i++) {
             wxString eachbyte;
-            eachbyte.Printf ("%s%02x", (i>0)?sep_string : "", (unsigned int)0xff&value[i]);
+            eachbyte.Printf (wxT("%02x"), (unsigned int)0xff&value[i]);
+            if (i)
+              buffer += wxString(sep_string, wxConvUTF8);
             buffer += eachbyte;
           }
           txtctrl->SetValue (buffer);
         } else {
-          txtctrl->SetValue (param->getptr ());
+          txtctrl->SetValue (wxString(param->getptr (), wxConvUTF8));
           txtctrl->SetMaxLength (param->get_maxsize ());
         }
 	sizer->Add (txtctrl, 0, wxALL, 2);
@@ -1221,7 +1220,7 @@
 	    if (!pagename) pagename = child->get_name ();
 	    panel->SetAutoLayout (TRUE);
 	    panel->SetSizer (boxsz);
-	    notebook->AddPage (panel, wxString(pagename));
+	    notebook->AddPage (panel, wxString(pagename, wxConvUTF8));
 	  }
 #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 6
 	  context->vertSizer->Add (nbsizer, 0, wxALL|wxGROW, 10);
@@ -1238,9 +1237,9 @@
 	} else {
           wxString boxTitle;
           if (list->get_options()->get () & bx_list_c::USE_BOX_TITLE) {
-            boxTitle = prompt;
+            boxTitle = wxString(prompt, wxConvUTF8);
           } else {
-            boxTitle = "";
+            boxTitle = wxT("");
           }
           wxStaticBox *box = new wxStaticBox (context->parent, -1, boxTitle);
 	  wxStaticBoxSizer *boxsz = new wxStaticBoxSizer (box, wxVERTICAL);
@@ -1267,7 +1266,7 @@
 	break;
       }
     default:
-      wxLogError ("ParamDialog::AddParam called with unsupported param type id=%d", (int)type);
+      wxLogError (wxT("ParamDialog::AddParam called with unsupported param type id=%d"), (int)type);
   }
 }
 
@@ -1278,7 +1277,8 @@
   wxNode *node;
   while ((node = idHash->Next ()) != NULL) {
     ParamStruct *pstr = (ParamStruct*) node->GetData ();
-    wxLogDebug ("commit changes for param %s", pstr->param->get_name ());
+    wxLogDebug (wxString(wxT("commit changes for param ")) +
+      wxString(pstr->param->get_name (), wxConvUTF8));
     int type = pstr->param->get_type ();
     switch (type) {
       case BXT_PARAM_BOOL: {
@@ -1291,15 +1291,16 @@
         bx_param_num_c *nump = (bx_param_num_c*) pstr->param;
 	bool valid;
         int n;
-	wxString complaint;
-	complaint.Printf ("Invalid integer for %s.", pstr->param->get_name ());
+	wxString complaint(wxT("Invalid integer for "));
+	complaint += wxString(pstr->param->get_name (), wxConvUTF8);
+	complaint += wxT(".");
         if (nump->get_options () & nump->USE_SPIN_CONTROL) {
           n = pstr->u.spin->GetValue ();
         } else {
           n = GetTextCtrlInt (pstr->u.text, &valid, true, complaint);
         }
         if ((n < nump->get_min ()) || (n > nump->get_max ())) {
-          wxMessageBox("Numerical parameter out of range", "Error", wxOK | wxICON_ERROR, this );
+          wxMessageBox(wxT("Numerical parameter out of range"), wxT("Error"), wxOK | wxICON_ERROR, this );
           return false;
         }
 	if (n != nump->get ()) nump->set (n);
@@ -1319,7 +1320,8 @@
           char src[1024];
           int i, p = 0;
           unsigned int n;
-          strcpy(src, tmp.c_str());
+          strncpy(src, tmp.mb_str(wxConvUTF8), sizeof(src));
+          src[sizeof(src)-1] = 0;
           for (i=0; i<stringp->get_maxsize (); i++) 
             buf[i] = 0;
           for (i=0; i<stringp->get_maxsize (); i++) {
@@ -1331,12 +1333,12 @@
               buf[i] = n;
               p+=2;
             } else {
-              wxMessageBox("Illegal raw byte format", "Error", wxOK | wxICON_ERROR, this );
+              wxMessageBox(wxT("Illegal raw byte format"), wxT("Error"), wxOK | wxICON_ERROR, this );
               return false;
             }
           }
         } else {
-          strncpy (buf, tmp.c_str(), sizeof(buf));
+          strncpy (buf, tmp.mb_str(wxConvUTF8), sizeof(buf));
         }
 	buf[sizeof(buf)-1] = 0;
 	if (!stringp->equals (buf)) stringp->set (buf);
@@ -1345,7 +1347,7 @@
       case BXT_LIST:
         break;
       default:
-        wxLogError ("ParamDialog::CopyGuiToParam: unsupported param type id=%d", (int)type);
+        wxLogError (wxT("ParamDialog::CopyGuiToParam: unsupported param type id=%d"), (int)type);
     }
   }
   return true;
@@ -1371,7 +1373,8 @@
 
 void ParamDialog::EnableChanged (ParamStruct *pstrOfCheckbox)
 {
-  wxLogDebug ("EnableChanged on checkbox %s", pstrOfCheckbox->param->get_name ());
+  wxLogDebug (wxString(wxT("EnableChanged on checkbox ")) +
+    wxString(pstrOfCheckbox->param->get_name (), wxConvUTF8));
   bx_param_bool_c *enableParam = (bx_param_bool_c*) pstrOfCheckbox->param;
   wxASSERT (enableParam->get_type () == BXT_PARAM_BOOL); // or we wouldn't be here
   bool en = pstrOfCheckbox->u.checkbox->GetValue ();
@@ -1390,10 +1393,14 @@
     ParamStruct *pstr = (ParamStruct*) paramHash->Get (param->get_id ());
     if (pstr) {
       if (param == pstrOfCheckbox->param) {
-	wxLogDebug ("not setting enable on checkbox '%s' that triggered the enable change", pstrOfCheckbox->param->get_name ());
+	wxLogDebug (wxString(wxT("not setting enable on checkbox '")) +
+	  wxString(pstrOfCheckbox->param->get_name (), wxConvUTF8) +
+	  wxT("' that triggered the enable change"));
 	continue;
       }
-      wxLogDebug ("setting enable for param '%s' to %d", pstr->param->get_name (), en?1:0);
+      wxLogDebug (wxString(wxT("setting enable for param '")) +
+        wxString(pstr->param->get_name (), wxConvUTF8) + wxT("' to %d"),
+        en?1:0);
       if (en != pstr->u.window->IsEnabled ()) {
 	EnableParam (pstr->param->get_id (), en);
 	//pstr->u.window->Enable (en);
@@ -1401,7 +1408,8 @@
 	//if (pstr->label) pstr->label->Enable (en);
 	bx_list_c *deps = pstr->param->get_dependent_list ();
 	if (deps) {
-	  wxLogDebug ("recursing on dependent list of %s", list->get_name ());
+	  wxLogDebug (wxString(wxT("recursing on dependent list of ")) +
+	    wxString(list->get_name (), wxConvUTF8));
 	  wxASSERT (pstr->param->get_type () == BXT_PARAM_BOOL);
           bool dep_en = pstr->u.window->IsEnabled () && pstr->u.checkbox->GetValue ();
 	  EnableChangedRecursive (deps, dep_en, pstr);
@@ -1431,7 +1439,7 @@
 
 void ParamDialog::EnumChanged (ParamStruct *pstr)
 {
-  wxLogDebug ("EnumChanged");
+  wxLogDebug (wxT("EnumChanged"));
   int id = pstr->param->get_id ();
   switch (id) {
     case BXP_ATA0_MASTER_TYPE:
@@ -1455,7 +1463,7 @@
       int type = pstr->u.choice->GetSelection ();
       if (type == BX_ATA_DEVICE_DISK) {
 	// enable cylinders, heads, spt
-	wxLogDebug ("enabling disk parameters");
+	wxLogDebug (wxT("enabling disk parameters"));
 	EnableParam (BXP_ATA0_MASTER_MODE+delta, 1);
 	EnableParam (BXP_ATA0_MASTER_CYLINDERS+delta, 1);
 	EnableParam (BXP_ATA0_MASTER_HEADS+delta, 1);
@@ -1479,7 +1487,7 @@
 
       } else {
 	// enable inserted
-	wxLogDebug ("enabling cdrom parameters");
+	wxLogDebug (wxT("enabling cdrom parameters"));
 	EnableParam (BXP_ATA0_MASTER_MODE+delta, 0);
 	EnableParam (BXP_ATA0_MASTER_CYLINDERS+delta, 0);
 	EnableParam (BXP_ATA0_MASTER_HEADS+delta, 0);
@@ -1544,7 +1552,7 @@
   wxNode *node;
   while ((node = idHash->Next ()) != NULL) {
     ParamStruct *pstr = (ParamStruct*) node->GetData ();
-    IFDBG_DLG (wxLogDebug ("refresh param %s", pstr->param->get_name ()));
+    IFDBG_DLG (wxLogDebug (wxString(wxT("refresh param ")) + pstr->param->get_name ()));
     int type = pstr->param->get_type ();
     switch (type) {
       case BXT_PARAM_BOOL: {
@@ -1567,13 +1575,13 @@
         }
       case BXT_PARAM_STRING: {
         bx_param_string_c *stringp = (bx_param_string_c*) pstr->param;
-	pstr->u.text->SetValue (wxString (stringp->getptr ()));
+	pstr->u.text->SetValue (wxString (stringp->getptr (), wxConvUTF8));
 	break;
         }
       case BXT_LIST:
         break;
       default:
-        wxLogError ("ParamDialog::CopyParamToGui(): unsupported param type id=%d", (int)type);
+        wxLogError (wxT("ParamDialog::CopyParamToGui(): unsupported param type id=%d"), (int)type);
     }
   }
 }
@@ -1585,11 +1593,11 @@
   if (isGeneratedId (id)) {
     ParamStruct *pstr = (ParamStruct*) idHash->Get (id);
     if (pstr == NULL) {
-      wxLogDebug ("ParamStruct not found for id=%d", id);
+      wxLogDebug (wxT("ParamStruct not found for id=%d"), id);
       return;
     }
     if (id == pstr->id) {
-      IFDBG_DLG (wxLogDebug ("event came from window %p (id=%d) controlled by parameter '%s'", pstr->u.window, id, pstr->param->get_name ()));
+      IFDBG_DLG (wxLogDebug (wxT("event came from window %p (id=%d) controlled by parameter '%s'"), pstr->u.window, id, pstr->param->get_name ()));
       switch (pstr->param->get_type ()) {
 	case BXT_PARAM_BOOL:
 	  EnableChanged (pstr);
@@ -1601,11 +1609,11 @@
       return;
     }
     if (id == pstr->browseButtonId) {
-      wxLogDebug ("browse button id=%d attached to wxTextCtrl %p", id, pstr->u.text);
+      wxLogDebug (wxT("browse button id=%d attached to wxTextCtrl %p"), id, pstr->u.text);
       BrowseTextCtrl (pstr->u.text);
       return;
     }
-    wxLogDebug ("id was key to ParamStruct but doesn't match either id inside");
+    wxLogDebug (wxT("id was key to ParamStruct but doesn't match either id inside"));
   }
   switch (id) {
     case wxID_OK:
@@ -1704,9 +1712,9 @@
   box1gridSizer = new wxFlexGridSizer (3);
   box1sizer->Add (box1gridSizer, 0, wxALL, insideStaticBoxMargin);
   AddParamList (standardList, box1gridSizer);
-  wxStaticText *vgabiosaddr1 = new wxStaticText (this, -1, "VGA BIOS address");
+  wxStaticText *vgabiosaddr1 = new wxStaticText (this, -1, wxT("VGA BIOS address"));
   box1gridSizer->Add (vgabiosaddr1, 0, wxALIGN_RIGHT|wxALL, 2);
-  wxStaticText *vgabiosaddr2 = new wxStaticText (this, -1, "0xC0000");
+  wxStaticText *vgabiosaddr2 = new wxStaticText (this, -1, wxT("0xC0000"));
   box1gridSizer->Add (vgabiosaddr2, 0, wxALL, 2);
 
   // box2 contains a list
@@ -1759,17 +1767,17 @@
   bx_id *idptr;
 
   // top level objects
-  wxStaticBox *mainRegsBox = new wxStaticBox (this, -1, "Basic Registers");
+  wxStaticBox *mainRegsBox = new wxStaticBox (this, -1, wxT("Basic Registers"));
   wxStaticBoxSizer *mainRegsBoxSizer = 
     new wxStaticBoxSizer (mainRegsBox, wxVERTICAL);
   mainSizer->Add (mainRegsBoxSizer, 0, wxALL|wxGROW, 10);
 
-  wxStaticBox *flagsBox = new wxStaticBox (this, -1, "EFLAGS Bits");
+  wxStaticBox *flagsBox = new wxStaticBox (this, -1, wxT("EFLAGS Bits"));
   wxStaticBoxSizer *flagsBoxSizer = 
     new wxStaticBoxSizer (flagsBox, wxVERTICAL);
   mainSizer->Add (flagsBoxSizer, 0, wxALL|wxGROW, 10);
 
-  wxStaticBox *otherBox = new wxStaticBox (this, -1, "Other Registers");
+  wxStaticBox *otherBox = new wxStaticBox (this, -1, wxT("Other Registers"));
   wxStaticBoxSizer *otherBoxSizer = 
     new wxStaticBoxSizer (otherBox, wxVERTICAL);
   mainSizer->Add (otherBoxSizer, 0, wxALL|wxGROW, 10);
@@ -1826,7 +1834,7 @@
 CpuRegistersDialog::AddFlag (bx_id paramId)
 {
   if (SIM->get_param (paramId) == NULL) {
-    wxLogDebug ("AddFlag on unregistered param id=%d", (int)paramId);
+    wxLogDebug (wxT("AddFlag on unregistered param id=%d"), (int)paramId);
     return;
   }
   wxASSERT (nflags < CPU_REGS_MAX_FLAGS);
@@ -1840,7 +1848,7 @@
   for (i=0; i<CPU_REGS_MAX_FLAGS; i++) {
     if (i<nflags) {
       bx_param_c *param = SIM->get_param (flagid[i]);
-      flagsSizer->Add (new wxStaticText (this, -1, param->get_name ()), 0, wxALL|wxALIGN_LEFT, 4);
+      flagsSizer->Add (new wxStaticText (this, -1, wxString(param->get_name (), wxConvUTF8)), 0, wxALL|wxALIGN_LEFT, 4);
     } else {
       flagsSizer->Add (0, 0);  // spacer
     }
@@ -1917,13 +1925,13 @@
       break;
 #if BX_DEBUGGER
   case ID_Debug_Stop:
-      wxLogDebug ("wxWidgets triggered a break");
+      wxLogDebug (wxT("wxWidgets triggered a break"));
       theFrame->DebugBreak ();
       break;
     case ID_Debug_Continue:
-      wxLogDebug ("before calling DebugCommand");
+      wxLogDebug (wxT("before calling DebugCommand"));
       theFrame->DebugCommand ("continue");
-      wxLogDebug ("after calling DebugCommand");
+      wxLogDebug (wxT("after calling DebugCommand"));
       break;
     case ID_Debug_Step:
       theFrame->DebugCommand ("step 1");
@@ -1960,12 +1968,13 @@
 CreateImage (int harddisk, int sectors, const char *filename)
 {
   if (sectors<1) {
-    wxMessageBox("The disk size is invalid.", "Invalid Size", wxOK | wxICON_ERROR );
+    wxMessageBox(wxT("The disk size is invalid."), wxT("Invalid Size"), wxOK | wxICON_ERROR );
     return false;
   }
-  wxLogDebug ("filename = '%s'\n", filename);
+  wxLogDebug (wxString(wxT("filename = '")) +
+    wxString(filename,  wxConvUTF8) + wxT("'\n"));
   if (strlen (filename) < 1) {
-    wxMessageBox("You must type a file name for the new disk image.", "Bad Filename", wxOK | wxICON_ERROR );
+    wxMessageBox(wxT("You must type a file name for the new disk image."), wxT("Bad Filename"), wxOK | wxICON_ERROR );
     return false;
   }
   // create disk image with name and capacity determined by the filename
@@ -1975,15 +1984,15 @@
   // you want to overwrite?".  If yes, call again with overwrite=1.
   int ret = SIM->create_disk_image (filename, sectors, 0);
   if (ret == -1) {  // already exists
-    int answer = wxMessageBox ("File exists.  Do you want to overwrite it?",
-      "File exists", wxYES_NO | wxCENTER);
+    int answer = wxMessageBox (wxT("File exists.  Do you want to overwrite it?"),
+      wxT("File exists"), wxYES_NO | wxCENTER);
     if (answer == wxYES)
       ret = SIM->create_disk_image (filename, sectors, 1);
     else 
       return false;  // wxNO
   }
   if (ret == -2) {
-    wxMessageBox("I could not create the disk image. Check for permission problems or available disk space.", "Failed", wxOK | wxICON_ERROR );
+    wxMessageBox(wxT("I could not create the disk image. Check for permission problems or available disk space."), wxT("Failed"), wxOK | wxICON_ERROR );
     return false;
   }
   wxASSERT (ret==0);
@@ -1992,7 +2001,7 @@
 
 void SetTextCtrl (wxTextCtrl *ctrl, const char *format, int val) {
   wxString tmp;
-  tmp.Printf (format, val);
+  tmp.Printf (wxString(format, wxConvUTF8), val);
   ctrl->SetValue (tmp);
 }
 
@@ -2003,7 +2012,8 @@
 {
   wxString tmp (ctrl->GetValue ());
   char buf[1024];
-  strncpy (buf, tmp.c_str(), sizeof(buf));
+  strncpy (buf, tmp.mb_str(wxConvUTF8), sizeof(buf));
+  buf[sizeof(buf)-1] = 0;
   int n = strtol (buf, NULL, 0);
   if (n != LONG_MIN && n != LONG_MAX) {
     if (valid) *valid = true;
@@ -2011,7 +2021,7 @@
   }
   if (valid) *valid = false;
   if (complain) {
-    wxMessageBox(complaint, "Invalid", wxOK | wxICON_ERROR );
+    wxMessageBox(complaint, wxT("Invalid"), wxOK | wxICON_ERROR );
     ctrl->SetFocus ();
   }
   return -1;
@@ -2020,7 +2030,7 @@
 bool BrowseTextCtrl (wxTextCtrl *text, wxString prompt, long style) {
   // try to configure the dialog to show hidden files
   wxConfigBase::Get() -> Write(wxT("/wxWidgets/wxFileDialog/ShowHidden"), true);
-  wxFileDialog *fdialog = new wxFileDialog (text->GetParent (), prompt, "", text->GetValue (), "*.*", style);
+  wxFileDialog *fdialog = new wxFileDialog (text->GetParent (), prompt, wxT(""), text->GetValue (), wxT("*.*"), style);
   int result = fdialog->ShowModal();
   if (result == wxID_OK)
     text->SetValue (fdialog->GetPath ());
@@ -2033,7 +2043,7 @@
     int evtype,
     bool includeNoChange)
 {
-  static char *choices[] = LOG_OPTS_CHOICES;
+  static const wxString choices[] = LOG_OPTS_CHOICES;
   static int integers[LOG_OPTS_N_CHOICES] = {0, 1, 2, 3, 4};
   wxChoice *control = new wxChoice (parent, id, wxDefaultPosition, wxDefaultSize);
   int lastChoice = 0;  // remember index of last choice
--- bochs-2.2.6/gui/wxdialog.h.wx26	2005-11-25 17:24:47.000000000 +0100
+++ bochs-2.2.6/gui/wxdialog.h	2006-02-16 19:02:56.000000000 +0100
@@ -9,20 +9,20 @@
 ////////////////////////////////////////////////////////////////////
 // text messages used in several places
 ////////////////////////////////////////////////////////////////////
-#define MSG_NO_HELP "No help is available yet."
-#define MSG_NO_HELP_CAPTION "No help"
-#define MSG_ENABLED "Enabled"
-#define BTNLABEL_HELP "Help"
-#define BTNLABEL_CANCEL "Cancel"
-#define BTNLABEL_OK "Ok"
-#define BTNLABEL_CREATE_IMG "Create Image"
-#define BTNLABEL_BROWSE "<--Browse"
-#define BTNLABEL_DEBUG_CONTINUE "Continue"
-#define BTNLABEL_DEBUG_STOP "Stop"
-#define BTNLABEL_DEBUG_STEP "Step"
-#define BTNLABEL_DEBUG_COMMIT "Commit"
-#define BTNLABEL_CLOSE "Close"
-#define BTNLABEL_EXECUTE "Execute"
+#define MSG_NO_HELP wxT("No help is available yet.")
+#define MSG_NO_HELP_CAPTION wxT("No help")
+#define MSG_ENABLED wxT("Enabled")
+#define BTNLABEL_HELP wxT("Help")
+#define BTNLABEL_CANCEL wxT("Cancel")
+#define BTNLABEL_OK wxT("Ok")
+#define BTNLABEL_CREATE_IMG wxT("Create Image")
+#define BTNLABEL_BROWSE wxT("<--Browse")
+#define BTNLABEL_DEBUG_CONTINUE wxT("Continue")
+#define BTNLABEL_DEBUG_STOP wxT("Stop")
+#define BTNLABEL_DEBUG_STEP wxT("Step")
+#define BTNLABEL_DEBUG_COMMIT wxT("Commit")
+#define BTNLABEL_CLOSE wxT("Close")
+#define BTNLABEL_EXECUTE wxT("Execute")
 
 #if defined(WIN32)
 // On win32, apparantly the spinctrl depends on a native control which only
@@ -37,9 +37,9 @@
 void ChangeStaticText (wxSizer *sizer, wxStaticText *win, wxString newtext);
 bool CreateImage (int harddisk, int sectors, const char *filename);
 void SetTextCtrl (wxTextCtrl *text, const char *format, int val);
-int GetTextCtrlInt (wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = "Invalid integer!");
+int GetTextCtrlInt (wxTextCtrl *text, bool *valid = NULL, bool complain=false, wxString complaint = wxT("Invalid integer!"));
 bool BrowseTextCtrl (wxTextCtrl *text,
-    wxString prompt="Choose a file",
+    wxString prompt=wxT("Choose a file"),
     long style=wxOPEN);
 wxChoice *makeLogOptionChoiceBox (wxWindow *parent, wxWindowID id, int evtype, bool includeNoChange = false);
 
@@ -75,11 +75,11 @@
 #define LOG_MSG_ASK_IDS \
   { ID_Continue, ID_Die, ID_DumpCore, ID_Debugger, wxHELP }
 #define LOG_MSG_ASK_NAMES \
-  { "Continue", "Kill Sim", "Dump Core", "Debugger", "Help" }
+  { wxT("Continue"), wxT("Kill Sim"), wxT("Dump Core"), wxT("Debugger"), wxT("Help") }
 #define LOG_MSG_DONT_ASK_STRING \
-  "Don't ask about future messages like this"
-#define LOG_MSG_CONTEXT "Context: %s"
-#define LOG_MSG_MSG "Message: %s"
+  wxT("Don't ask about future messages like this")
+#define LOG_MSG_CONTEXT wxT("Context: ")
+#define LOG_MSG_MSG wxT("Message: ")
 private:
   wxStaticText *context, *message;
   wxCheckBox *dontAsk;
@@ -168,12 +168,12 @@
 class FloppyConfigDialog: public wxDialog
 {
 public:
-#define FLOPPY_CONFIG_TITLE "Configure %s"
-#define FLOPPY_CONFIG_INSTRS "Select the device or image to use when simulating %s."
-#define FLOPPY_CONFIG_CAP "What is the capacity of this disk?"
-#define FLOPPY_CONFIG_HINT "To create a disk image, choose the file name and capacity, then click on \"Create Image\".\n\n" \
-                           "Clicking OK signals a media change for this drive."
-#define FLOPPY_CONFIG_DISKIMG "Disk image: "
+#define FLOPPY_CONFIG_TITLE wxT("Configure ")
+#define FLOPPY_CONFIG_INSTRS wxT("Select the device or image to use when simulating ")
+#define FLOPPY_CONFIG_CAP wxT("What is the capacity of this disk?")
+#define FLOPPY_CONFIG_HINT wxT("To create a disk image, choose the file name and capacity, then click on \"Create Image\".\n\n") \
+                           wxT("Clicking OK signals a media change for this drive.")
+#define FLOPPY_CONFIG_DISKIMG wxT("Disk image: ")
 private:
   void Init ();  // called automatically by ShowModal()
   void ShowHelp ();
@@ -245,13 +245,13 @@
 class LogOptionsDialog: public wxDialog
 {
 private:
-#define LOG_OPTS_TITLE "Configure Log Events"
-#define LOG_OPTS_LOGFILE "Log file is "
-#define LOG_OPTS_DEBUGGER_LOGFILE "Debugger log file is "
-#define LOG_OPTS_PROMPT "How should Bochs respond to each type of event?"
-#define LOG_OPTS_TYPE_NAMES { "Debug events: ", "Info events: ", "Error events: ", "Panic events: ", "Pass events: " }
+#define LOG_OPTS_TITLE wxT("Configure Log Events")
+#define LOG_OPTS_LOGFILE wxT("Log file is ")
+#define LOG_OPTS_DEBUGGER_LOGFILE wxT("Debugger log file is ")
+#define LOG_OPTS_PROMPT wxT("How should Bochs respond to each type of event?")
+#define LOG_OPTS_TYPE_NAMES { wxT("Debug events: "), wxT("Info events: "), wxT("Error events: "), wxT("Panic events: "), wxT("Pass events: ") }
 #define LOG_OPTS_N_TYPES 5
-#define LOG_OPTS_CHOICES { "ignore", "log", "ask user", "end simulation", "no change" }
+#define LOG_OPTS_CHOICES { wxT("ignore"), wxT("log"), wxT("ask user"), wxT("end simulation"), wxT("no change") }
 #define LOG_OPTS_N_CHOICES_NORMAL 4
 #define LOG_OPTS_N_CHOICES 5   // number of choices, including "no change"
 #define LOG_OPTS_NO_CHANGE 4   // index of "no change"
@@ -264,7 +264,7 @@
    /* can't ignore panics or errors */ \
    || (type >= 2 && choice==0) \
    )
-#define LOG_OPTS_ADV "For additional control over how each device responds to events, use the menu option \"Log ... By Device\"."
+#define LOG_OPTS_ADV wxT("For additional control over how each device responds to events, use the menu option \"Log ... By Device\".")
   void Init ();  // called automatically by ShowModal()
   void ShowHelp ();
   wxBoxSizer *vertSizer, *logfileSizer, *debuggerlogfileSizer, *buttonSizer;
@@ -316,16 +316,16 @@
 class AdvancedLogOptionsDialog: public wxDialog
 {
 private:
-#define ADVLOG_OPTS_TITLE "Configure Log Events"
+#define ADVLOG_OPTS_TITLE wxT("Configure Log Events")
 #define ADVLOG_OPTS_LOGFILE LOG_OPTS_LOGFILE
-#define ADVLOG_OPTS_PROMPT                                                    \
+#define ADVLOG_OPTS_PROMPT wxT(                                                   \
 "This table determines how Bochs will respond to each kind of event coming\n" \
 "from a particular source.  For example if you are having problems with\n"    \
 "the keyboard, you could ask for debug and info events from the keyboard\n"   \
-"to be reported."
-#define ADVLOG_OPTS_TYPE_NAMES { "Debug", "Info", "Error", "Panic", "Pass" }
+"to be reported.")
+#define ADVLOG_OPTS_TYPE_NAMES { wxT("Debug"), wxT("Info"), wxT("Error"), wxT("Panic"), wxT("Pass") }
 #define ADVLOG_OPTS_N_TYPES 5
-#define ADVLOG_DEFAULTS "Use defaults for all devices"
+#define ADVLOG_DEFAULTS wxT("Use defaults for all devices")
   void Init ();  // called automatically by ShowModal()
   void ShowHelp ();
   wxBoxSizer *vertSizer, *logfileSizer, *buttonSizer;
@@ -378,8 +378,8 @@
 class DebugLogDialog: public wxDialog
 {
 private:
-#define DEBUG_LOG_TITLE "Debugger log"
-#define DEBUG_CMD_PROMPT "Type a debugger command:"
+#define DEBUG_LOG_TITLE wxT("Debugger log")
+#define DEBUG_CMD_PROMPT wxT("Type a debugger command:")
   wxBoxSizer *mainSizer, *commandSizer, *buttonSizer;
   wxTextCtrl *log, *command;
   Bit32u lengthMax;
@@ -507,9 +507,9 @@
 
 class ConfigMemoryDialog : public ParamDialog
 {
-#define CONFIG_MEMORY_TITLE "Configure Memory"
-#define CONFIG_MEMORY_BOX1_TITLE "Standard Options"
-#define CONFIG_MEMORY_BOX2_TITLE "Optional ROM Images"
+#define CONFIG_MEMORY_TITLE wxT("Configure Memory")
+#define CONFIG_MEMORY_BOX1_TITLE wxT("Standard Options")
+#define CONFIG_MEMORY_BOX2_TITLE wxT("Optional ROM Images")
 private:
   wxFlexGridSizer *box1gridSizer, *box2gridSizer;
 public:
--- bochs-2.2.6/gui/wxmain.cc.wx26	2005-11-26 10:22:58.000000000 +0100
+++ bochs-2.2.6/gui/wxmain.cc	2006-02-16 20:25:09.000000000 +0100
@@ -193,10 +193,10 @@
 extern "C" int libwx_LTX_plugin_init (plugin_t *plugin, plugintype_t type,
   int argc, char *argv[])
 {
-  wxLogDebug ("plugin_init for wxmain.cc");
-  wxLogDebug ("installing wxWidgets as the configuration interface");
+  wxLogDebug (wxT("plugin_init for wxmain.cc"));
+  wxLogDebug (wxT("installing wxWidgets as the configuration interface"));
   SIM->register_configuration_interface ("wx", ci_callback, NULL);
-  wxLogDebug ("installing %s as the Bochs GUI", "wxWidgets");
+  wxLogDebug (wxT("installing wxWidgets as the Bochs GUI"));
   MyPanel::OnPluginInit ();
   return 0; // success
 }
@@ -234,7 +234,7 @@
   // simulation begins.  This is responsible for displaying any error
   // dialogs during bochsrc and command line processing.
   SIM->set_notify_callback (&MyApp::DefaultCallback, this);
-  MyFrame *frame = new MyFrame( "Bochs x86 Emulator", wxPoint(50,50), wxSize(450,340), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION );
+  MyFrame *frame = new MyFrame(wxT("Bochs x86 Emulator"), wxPoint(50,50), wxSize(450,340), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION );
   theFrame = frame;  // hack alert
   frame->Show( TRUE );
   SetTopWindow( frame );
@@ -256,20 +256,20 @@
 BxEvent *
 MyApp::DefaultCallback (void *thisptr, BxEvent *event)
 {
-  wxLogDebug ("DefaultCallback: event type %d", event->type);
+  wxLogDebug (wxT("DefaultCallback: event type %d"), event->type);
   event->retcode = -1;  // default return code
   switch (event->type)
   {
     case BX_ASYNC_EVT_LOG_MSG:
     case BX_SYNC_EVT_LOG_ASK: {
-      wxLogDebug ("DefaultCallback: log ask event");
+      wxLogDebug (wxT("DefaultCallback: log ask event"));
       wxString text;
-      text.Printf ("Error: %s", event->u.logmsg.msg);
+      text.Printf (wxT("Error: %s"), event->u.logmsg.msg);
       if (wxBochsClosing) {
         // gui closing down, do something simple and nongraphical.
-        fprintf (stderr, "%s\n", text.c_str ());
+        fprintf (stderr, "%s\n", (const char *)text.mb_str(wxConvUTF8));
       } else {
-        wxMessageBox (text, "Error", wxOK | wxICON_ERROR );
+        wxMessageBox (text, wxT("Error"), wxOK | wxICON_ERROR );
         // maybe I can make OnLogMsg display something that looks appropriate.
         // theFrame->OnLogMsg (event);
       }
@@ -289,7 +289,7 @@
     case BX_SYNC_EVT_GET_DBG_COMMAND:
       break;  // ignore
     default:
-      wxLogDebug ("DefaultCallback: unknown event type %d", event->type);
+      wxLogDebug (wxT("DefaultCallback: unknown event type %d"), event->type);
   }
   if (BX_EVT_IS_ASYNC(event->type)) {
     delete event;
@@ -415,61 +415,61 @@
 
   // set up the gui
   menuConfiguration = new wxMenu;
-  menuConfiguration->Append( ID_Config_New, "&New Configuration" );
-  menuConfiguration->Append( ID_Config_Read, "&Read Configuration" );
-  menuConfiguration->Append( ID_Config_Save, "&Save Configuration" );
+  menuConfiguration->Append( ID_Config_New, wxT("&New Configuration") );
+  menuConfiguration->Append( ID_Config_Read, wxT("&Read Configuration") );
+  menuConfiguration->Append( ID_Config_Save, wxT("&Save Configuration") );
   menuConfiguration->AppendSeparator ();
-  menuConfiguration->Append (ID_Quit, "&Quit");
+  menuConfiguration->Append (ID_Quit, wxT("&Quit"));
 
   menuEdit = new wxMenu;
-  menuEdit->Append( ID_Edit_FD_0, "Floppy Disk &0..." );
-  menuEdit->Append( ID_Edit_FD_1, "Floppy Disk &1..." );
-  menuEdit->Append( ID_Edit_ATA0, "ATA Channel 0..." );
-  menuEdit->Append( ID_Edit_ATA1, "ATA Channel 1..." );
-  menuEdit->Append( ID_Edit_ATA2, "ATA Channel 2..." );
-  menuEdit->Append( ID_Edit_ATA3, "ATA Channel 3..." );
-  menuEdit->Append( ID_Edit_Boot, "&Boot..." );
-  menuEdit->Append( ID_Edit_Memory, "&Memory..." );
-  menuEdit->Append( ID_Edit_PCI, "&PCI..." );
-  menuEdit->Append( ID_Edit_Sound, "S&ound..." );
-  menuEdit->Append( ID_Edit_Timing, "&Timing..." );
-  menuEdit->Append( ID_Edit_Network, "&Network..." );
-  menuEdit->Append( ID_Edit_Keyboard, "&Keyboard..." );
-  menuEdit->Append( ID_Edit_Serial_Parallel, "&Serial/Parallel..." );
-  menuEdit->Append( ID_Edit_LoadHack, "&Loader Hack..." );
-  menuEdit->Append( ID_Edit_Other, "&Other..." );
+  menuEdit->Append( ID_Edit_FD_0, wxT("Floppy Disk &0...") );
+  menuEdit->Append( ID_Edit_FD_1, wxT("Floppy Disk &1...") );
+  menuEdit->Append( ID_Edit_ATA0, wxT("ATA Channel 0...") );
+  menuEdit->Append( ID_Edit_ATA1, wxT("ATA Channel 1...") );
+  menuEdit->Append( ID_Edit_ATA2, wxT("ATA Channel 2...") );
+  menuEdit->Append( ID_Edit_ATA3, wxT("ATA Channel 3...") );
+  menuEdit->Append( ID_Edit_Boot, wxT("&Boot...") );
+  menuEdit->Append( ID_Edit_Memory, wxT("&Memory...") );
+  menuEdit->Append( ID_Edit_PCI, wxT("&PCI...") );
+  menuEdit->Append( ID_Edit_Sound, wxT("S&ound...") );
+  menuEdit->Append( ID_Edit_Timing, wxT("&Timing...") );
+  menuEdit->Append( ID_Edit_Network, wxT("&Network...") );
+  menuEdit->Append( ID_Edit_Keyboard, wxT("&Keyboard...") );
+  menuEdit->Append( ID_Edit_Serial_Parallel, wxT("&Serial/Parallel...") );
+  menuEdit->Append( ID_Edit_LoadHack, wxT("&Loader Hack...") );
+  menuEdit->Append( ID_Edit_Other, wxT("&Other...") );
 
   menuSimulate = new wxMenu;
-  menuSimulate->Append( ID_Simulate_Start, "&Start...");
-  menuSimulate->Append( ID_Simulate_PauseResume, "&Pause...");
-  menuSimulate->Append( ID_Simulate_Stop, "S&top...");
+  menuSimulate->Append( ID_Simulate_Start, wxT("&Start..."));
+  menuSimulate->Append( ID_Simulate_PauseResume, wxT("&Pause..."));
+  menuSimulate->Append( ID_Simulate_Stop, wxT("S&top..."));
   menuSimulate->AppendSeparator ();
   menuSimulate->Enable (ID_Simulate_PauseResume, FALSE);
   menuSimulate->Enable (ID_Simulate_Stop, FALSE);
 
   menuDebug = new wxMenu;
-  menuDebug->Append (ID_Debug_ShowCpu, "Show &CPU");
-  menuDebug->Append (ID_Debug_ShowKeyboard, "Show &Keyboard");
+  menuDebug->Append (ID_Debug_ShowCpu, wxT("Show &CPU"));
+  menuDebug->Append (ID_Debug_ShowKeyboard, wxT("Show &Keyboard"));
 #if BX_DEBUGGER
-  menuDebug->Append (ID_Debug_Console, "Debug Console");
+  menuDebug->Append (ID_Debug_Console, wxT("Debug Console"));
 #endif
-  menuDebug->Append (ID_Debug_ShowMemory, "Show &memory");
+  menuDebug->Append (ID_Debug_ShowMemory, wxT("Show &memory"));
 
   menuLog = new wxMenu;
-  menuLog->Append (ID_Log_View, "&View");
-  menuLog->Append (ID_Log_Prefs, "&Preferences...");
-  menuLog->Append (ID_Log_PrefsDevice, "By &Device...");
+  menuLog->Append (ID_Log_View, wxT("&View"));
+  menuLog->Append (ID_Log_Prefs, wxT("&Preferences..."));
+  menuLog->Append (ID_Log_PrefsDevice, wxT("By &Device..."));
 
   menuHelp = new wxMenu;
-  menuHelp->Append( ID_Help_About, "&About..." );
+  menuHelp->Append( ID_Help_About, wxT("&About...") );
 
   wxMenuBar *menuBar = new wxMenuBar;
-  menuBar->Append( menuConfiguration, "&File" );
-  menuBar->Append( menuEdit, "&Edit" );
-  menuBar->Append( menuSimulate, "&Simulate" );
-  menuBar->Append( menuDebug, "&Debug" );
-  menuBar->Append( menuLog, "&Log" );
-  menuBar->Append( menuHelp, "&Help" );
+  menuBar->Append( menuConfiguration, wxT("&File") );
+  menuBar->Append( menuEdit, wxT("&Edit") );
+  menuBar->Append( menuSimulate, wxT("&Simulate") );
+  menuBar->Append( menuDebug, wxT("&Debug") );
+  menuBar->Append( menuLog, wxT("&Log") );
+  menuBar->Append( menuHelp, wxT("&Help") );
   SetMenuBar( menuBar );
 
   // disable things that don't work yet
@@ -490,20 +490,20 @@
     tb->AddTool(id, wxBitmap(xpm_name), tooltip); \
   } while (0)
 
-  BX_ADD_TOOL(ID_Edit_FD_0, floppya_xpm, "Change Floppy A");
-  BX_ADD_TOOL(ID_Edit_FD_1, floppyb_xpm, "Change Floppy B");
-  BX_ADD_TOOL(ID_Edit_Cdrom, cdromd_xpm, "Change CDROM");
-  BX_ADD_TOOL(ID_Toolbar_Reset, reset_xpm, "Reset the system");
-  BX_ADD_TOOL(ID_Toolbar_Power, power_xpm, "Turn power on/off");
-
-  BX_ADD_TOOL(ID_Toolbar_Copy, copy_xpm, "Copy to clipboard");
-  BX_ADD_TOOL(ID_Toolbar_Paste, paste_xpm, "Paste from clipboard");
-  BX_ADD_TOOL(ID_Toolbar_Snapshot, snapshot_xpm, "Save screen snapshot");
+  BX_ADD_TOOL(ID_Edit_FD_0, floppya_xpm, wxT("Change Floppy A"));
+  BX_ADD_TOOL(ID_Edit_FD_1, floppyb_xpm, wxT("Change Floppy B"));
+  BX_ADD_TOOL(ID_Edit_Cdrom, cdromd_xpm, wxT("Change CDROM"));
+  BX_ADD_TOOL(ID_Toolbar_Reset, reset_xpm, wxT("Reset the system"));
+  BX_ADD_TOOL(ID_Toolbar_Power, power_xpm, wxT("Turn power on/off"));
+
+  BX_ADD_TOOL(ID_Toolbar_Copy, copy_xpm, wxT("Copy to clipboard"));
+  BX_ADD_TOOL(ID_Toolbar_Paste, paste_xpm, wxT("Paste from clipboard"));
+  BX_ADD_TOOL(ID_Toolbar_Snapshot, snapshot_xpm, wxT("Save screen snapshot"));
   // Omit config button because the whole wxWidgets interface is like
   // one really big config button.
   //BX_ADD_TOOL(ID_Toolbar_Config, configbutton_xpm, "Runtime Configuration");
-  BX_ADD_TOOL(ID_Toolbar_Mouse_en, mouse_xpm, "Enable/disable mouse capture\nThere is also a shortcut for this: a CTRL key + the middle mouse button.");
-  BX_ADD_TOOL(ID_Toolbar_User, userbutton_xpm, "Keyboard shortcut");
+  BX_ADD_TOOL(ID_Toolbar_Mouse_en, mouse_xpm, wxT("Enable/disable mouse capture\nThere is also a shortcut for this: a CTRL key + the middle mouse button."));
+  BX_ADD_TOOL(ID_Toolbar_User, userbutton_xpm, wxT("Keyboard shortcut"));
 
   tb->Realize();
 
@@ -527,24 +527,24 @@
 MyFrame::~MyFrame ()
 {
   delete panel;
-  wxLogDebug ("MyFrame destructor");
+  wxLogDebug (wxT("MyFrame destructor"));
   theFrame = NULL;
 }
 
 void MyFrame::OnConfigNew(wxCommandEvent& WXUNUSED(event))
 {
-  int answer = wxMessageBox ("This will reset all settings back to their default values.\nAre you sure you want to do this?",
-    "Are you sure?", wxYES_NO | wxCENTER, this);
+  int answer = wxMessageBox (wxT("This will reset all settings back to their default values.\nAre you sure you want to do this?"),
+    wxT("Are you sure?"), wxYES_NO | wxCENTER, this);
   if (answer == wxYES) SIM->reset_all_param ();
 }
 
 void MyFrame::OnConfigRead(wxCommandEvent& WXUNUSED(event))
 {
-  char *bochsrc;
+  const char *bochsrc;
   long style = wxOPEN;
-  wxFileDialog *fdialog = new wxFileDialog (this, "Read configuration", "", "", "*.*", style);
+  wxFileDialog *fdialog = new wxFileDialog (this, wxT("Read configuration"), wxT(""), wxT(""), wxT("*.*"), style);
   if (fdialog->ShowModal() == wxID_OK) {
-    bochsrc = (char *)fdialog->GetPath().c_str ();
+    bochsrc = fdialog->GetPath().mb_str(wxConvUTF8);
     SIM->reset_all_param ();
     SIM->read_rc (bochsrc);
   }
@@ -553,11 +553,11 @@
 
 void MyFrame::OnConfigSave(wxCommandEvent& WXUNUSED(event))
 {
-  char *bochsrc;
+  const char *bochsrc;
   long style = wxSAVE | wxOVERWRITE_PROMPT;
-  wxFileDialog *fdialog = new wxFileDialog (this, "Save configuration", "", "", "*.*", style);
+  wxFileDialog *fdialog = new wxFileDialog (this, wxT("Save configuration"), wxT(""), wxT(""), wxT("*.*"), style);
   if (fdialog->ShowModal() == wxID_OK) {
-    bochsrc = (char *)fdialog->GetPath().c_str ();
+    bochsrc = fdialog->GetPath().mb_str(wxConvUTF8);
     SIM->write_rc (bochsrc, 1);
   }
   delete fdialog;
@@ -581,13 +581,13 @@
     dev_id[bootDevices++] = BX_BOOT_CDROM;
   }
   if (bootDevices == 0) {
-    wxMessageBox( "All the possible boot devices are disabled right now!\nYou must enable the first floppy drive, a hard drive, or a CD-ROM.",
-                  "None enabled", wxOK | wxICON_ERROR, this );
+    wxMessageBox( wxT("All the possible boot devices are disabled right now!\nYou must enable the first floppy drive, a hard drive, or a CD-ROM."),
+                  wxT("None enabled"), wxOK | wxICON_ERROR, this );
     return;
   }
   ParamDialog dlg (this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_BOOT);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.ShowModal ();
 }
@@ -602,7 +602,7 @@
 {
   ParamDialog dlg (this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_PCI);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.ShowModal ();
 }
@@ -611,7 +611,7 @@
 {
   ParamDialog dlg (this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_SB16);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.ShowModal ();
@@ -621,7 +621,7 @@
 {
   ParamDialog dlg (this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_CLOCK);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.ShowModal ();
 }
@@ -630,7 +630,7 @@
 {
   ParamDialog dlg (this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_NETWORK);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.ShowModal ();
 }
@@ -639,7 +639,7 @@
 {
   ParamDialog dlg(this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_MENU_KEYBOARD);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.ShowModal ();
@@ -649,7 +649,7 @@
 {
   ParamDialog dlg(this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_MENU_SERIAL_PARALLEL);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.ShowModal ();
@@ -659,7 +659,7 @@
 {
   ParamDialog dlg(this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_LOAD32BITOS);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.ShowModal ();
 }
@@ -668,7 +668,7 @@
 {
   ParamDialog dlg(this, -1);
   bx_list_c *list = (bx_list_c*) SIM->get_param (BXP_MENU_MISC_2);
-  dlg.SetTitle (list->get_name ());
+  dlg.SetTitle (wxString(list->get_name (), wxConvUTF8));
   dlg.AddParam (list);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.ShowModal ();
@@ -682,9 +682,9 @@
   wxASSERT (SIM->get_max_log_level() == LOG_OPTS_N_TYPES);
   LogOptionsDialog dlg (this, -1);
   bx_param_string_c *logfile = SIM->get_param_string (BXP_LOG_FILENAME);
-  dlg.SetLogfile (wxString (logfile->getptr ()));
+  dlg.SetLogfile (wxString (logfile->getptr (), wxConvUTF8));
   bx_param_string_c *debuggerlogfile = SIM->get_param_string (BXP_DEBUGGER_LOG_FILENAME);
-  dlg.SetDebuggerlogfile (wxString (debuggerlogfile->getptr ()));
+  dlg.SetDebuggerlogfile (wxString (debuggerlogfile->getptr (), wxConvUTF8));
 
   // The inital values of the dialog are complicated.  If the panic action
   // for all modules is "ask", then clearly the inital value in the dialog
@@ -758,16 +758,16 @@
 {
   if (SIM->get_param (BXP_CPU_EAX) == NULL) {
     // if params not initialized yet, then give up
-    wxMessageBox ("Cannot show the debugger window until the simulation has begun.",
-                  "Sim not started", wxOK | wxICON_ERROR, this );
+    wxMessageBox (wxT("Cannot show the debugger window until the simulation has begun."),
+                  wxT("Sim not started"), wxOK | wxICON_ERROR, this );
     return;
   }
   if (showCpu == NULL) {
     showCpu = new CpuRegistersDialog (this, -1);
 #if BX_DEBUGGER
-    showCpu->SetTitle ("Bochs Debugger");
+    showCpu->SetTitle (wxT("Bochs Debugger"));
 #else
-    showCpu->SetTitle ("CPU Registers");
+    showCpu->SetTitle (wxT("CPU Registers"));
 #endif
     showCpu->Init ();
   } else {
@@ -780,13 +780,13 @@
 {
   if (SIM->get_param (BXP_KBD_PARAMETERS) == NULL) {
     // if params not initialized yet, then give up
-    wxMessageBox ("Cannot show the debugger window until the simulation has begun.",
-                  "Sim not started", wxOK | wxICON_ERROR, this );
+    wxMessageBox (wxT("Cannot show the debugger window until the simulation has begun."),
+                  wxT("Sim not started"), wxOK | wxICON_ERROR, this );
     return;
   }
   if (showKbd == NULL) {
     showKbd = new ParamDialog (this, -1);
-    showKbd->SetTitle ("Keyboard State (incomplete, this is a demo)");
+    showKbd->SetTitle (wxT("Keyboard State (incomplete, this is a demo)"));
     showKbd->AddParam (SIM->get_param (BXP_KBD_PARAMETERS));
     showKbd->Init ();
   } else {
@@ -826,12 +826,12 @@
 void
 MyFrame::DebugCommand (const char *cmd)
 {
-  wxLogDebug ("debugger command: %s", cmd);
+  wxLogDebug (wxString(wxT("debugger command: ")) + wxString(cmd, wxConvUTF8));
   wxASSERT (showDebugLog != NULL);
   showDebugLog->AppendCommand (cmd);
   if (debugCommand != NULL) {
     // one is already waiting
-    wxLogDebug ("multiple debugger commands, discarding the earlier one");
+    wxLogDebug (wxT("multiple debugger commands, discarding the earlier one"));
     delete debugCommand;
     debugCommand = NULL;
   }
@@ -840,7 +840,8 @@
   strncpy (tmp, cmd, len+1);
   // if an event is waiting for us, fill it an send back to sim_thread.
   if (debugCommandEvent != NULL) {
-    wxLogDebug ("sim_thread was waiting for this command '%s'", tmp);
+    wxLogDebug (wxString(wxT("sim_thread was waiting for this command '")) +
+      wxString(tmp, wxConvUTF8) + wxT("'"));
     wxASSERT (debugCommandEvent->type == BX_SYNC_EVT_GET_DBG_COMMAND);
     debugCommandEvent->u.debugcmd.command = tmp;
     debugCommandEvent->retcode = 1;
@@ -849,7 +850,8 @@
     debugCommandEvent = NULL;
   } else {
     // store this command in debugCommand for the future
-    wxLogDebug ("storing debugger command '%s'", tmp);
+    wxLogDebug (wxT("storing debugger command '")) +
+      wxString(tmp, wxConvUTF8) + wxT("'"));
     debugCommand = tmp;
   }
 }
@@ -864,47 +866,48 @@
   } else {
     SIM->set_notify_callback (&MyApp::DefaultCallback, this);
     // ask the simulator to stop.  When it stops it will close this frame.
-    SetStatusText ("Waiting for simulation to stop...");
+    SetStatusText (wxT("Waiting for simulation to stop..."));
     OnKillSim (event);
   }
 }
 
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
-  wxString str;
-  str.Printf ("Bochs x86 Emulator version %s (wxWidgets port)", VER_STRING);
-  wxMessageBox( str, "About Bochs", wxOK | wxICON_INFORMATION, this );
+  wxString str(wxT("Bochs x86 Emulator version "));
+  str += wxString(VER_STRING, wxConvUTF8);
+  str += wxT(" (wxWidgets port)");
+  wxMessageBox( str, wxT("About Bochs"), wxOK | wxICON_INFORMATION, this );
 }
 
 // update the menu items, status bar, etc.
 void MyFrame::simStatusChanged (StatusChange change, bx_bool popupNotify) {
   switch (change) {
     case Start:  // running
-      wxLogStatus ("Starting Bochs simulation");
+      wxLogStatus (wxT("Starting Bochs simulation"));
       menuSimulate->Enable (ID_Simulate_Start, FALSE);
       menuSimulate->Enable (ID_Simulate_PauseResume, TRUE);
       menuSimulate->Enable (ID_Simulate_Stop, TRUE);
-      menuSimulate->SetLabel (ID_Simulate_PauseResume, "&Pause");
+      menuSimulate->SetLabel (ID_Simulate_PauseResume, wxT("&Pause"));
       break;
     case Stop: // not running
-      wxLogStatus ("Simulation stopped");
+      wxLogStatus (wxT("Simulation stopped"));
       menuSimulate->Enable (ID_Simulate_Start, TRUE);
       menuSimulate->Enable (ID_Simulate_PauseResume, FALSE);
       menuSimulate->Enable (ID_Simulate_Stop, FALSE);
-      menuSimulate->SetLabel (ID_Simulate_PauseResume, "&Pause");
+      menuSimulate->SetLabel (ID_Simulate_PauseResume, wxT("&Pause"));
       // This should only be used if the simulation stops due to error.
       // Obviously if the user asked it to stop, they don't need to be told.
       if (popupNotify)
-        wxMessageBox("Bochs simulation has stopped.", "Bochs Stopped", 
+        wxMessageBox(wxT("Bochs simulation has stopped."), wxT("Bochs Stopped"), 
             wxOK | wxICON_INFORMATION, this);
       break;
     case Pause: // pause
-      wxLogStatus ("Pausing simulation");
-      menuSimulate->SetLabel (ID_Simulate_PauseResume, "&Resume");
+      wxLogStatus (wxT("Pausing simulation"));
+      menuSimulate->SetLabel (ID_Simulate_PauseResume, wxT("&Resume"));
       break;
     case Resume: // resume
-      wxLogStatus ("Resuming simulation");
-      menuSimulate->SetLabel (ID_Simulate_PauseResume, "&Pause");
+      wxLogStatus (wxT("Resuming simulation"));
+      menuSimulate->SetLabel (ID_Simulate_PauseResume, wxT("&Pause"));
       break;
   }
   bool canConfigure = (change == Stop);
@@ -942,8 +945,8 @@
   wxCriticalSectionLocker lock(sim_thread_lock);
   if (sim_thread != NULL) {
         wxMessageBox (
-          "Can't start Bochs simulator, because it is already running",
-          "Already Running", wxOK | wxICON_ERROR, this);
+          wxT("Can't start Bochs simulator, because it is already running"),
+          wxT("Already Running"), wxOK | wxICON_ERROR, this);
         return;
   }
   // check that display library is set to wx.  If not, give a warning and
@@ -954,10 +957,10 @@
   char *gui_name = gui_param->get_choice (gui_param->get ());
   if (strcmp (gui_name, "wx") != 0) {
     wxMessageBox (
-    "The display library was not set to wxWidgets.  When you use the\n"
-    "wxWidgets configuration interface, you must also select the wxWidgets\n"
-    "display library.  I will change it to 'wx' now.",
-    "display library error", wxOK | wxICON_WARNING, this);
+    wxT("The display library was not set to wxWidgets.  When you use the\n")
+    wxT("wxWidgets configuration interface, you must also select the wxWidgets\n")
+    wxT("display library.  I will change it to 'wx' now."),
+    wxT("display library error"), wxOK | wxICON_WARNING, this);
     if (!gui_param->set_by_name ("wx")) {
       wxASSERT (0 && "Could not set display library setting to 'wx");
     }
@@ -966,14 +969,14 @@
   start_bochs_times++;
   if (start_bochs_times>1) {
         wxMessageBox (
-        "You have already started the simulator once this session. Due to memory leaks and bugs in init code, you may get unstable behavior.",
-        "2nd time warning", wxOK | wxICON_WARNING, this);
+        wxT("You have already started the simulator once this session. Due to memory leaks and bugs in init code, you may get unstable behavior."),
+        wxT("2nd time warning"), wxOK | wxICON_WARNING, this);
   }
   num_events = 0;  // clear the queue of events for bochs to handle
   sim_thread = new SimThread (this);
   sim_thread->Create ();
   sim_thread->Run ();                                                        
-  wxLogDebug ("Simulator thread has started.");
+  wxLogDebug (wxT("Simulator thread has started."));
   // set up callback for events from simulator thread
   SIM->set_notify_callback (&SimThread::SiminterfaceCallback, sim_thread);
   simStatusChanged (Start);
@@ -998,7 +1001,7 @@
   // DON'T use a critical section here.  Delete implicitly calls
   // OnSimThreadExit, which also tries to lock sim_thread_lock.
   // If we grab the lock at this level, deadlock results.
-  wxLogDebug ("OnKillSim()");
+  wxLogDebug (wxT("OnKillSim()"));
 #if BX_DEBUGGER
   // the sim_thread may be waiting for a debugger command.  If so, send
   // it a "quit"
@@ -1021,30 +1024,30 @@
 int 
 MyFrame::HandleAskParamString (bx_param_string_c *param)
 {
-  wxLogDebug ("HandleAskParamString start");
+  wxLogDebug (wxT("HandleAskParamString start"));
   bx_param_num_c *opt = param->get_options ();
   wxASSERT (opt != NULL);
   int n_opt = opt->get ();
   char *msg = param->get_name ();
-  char *newval = NULL;
+  const char *newval = NULL;
   wxDialog *dialog = NULL;
   if (n_opt & param->IS_FILENAME) {
     // use file open dialog
         long style = 
           (n_opt & param->SAVE_FILE_DIALOG) ? wxSAVE|wxOVERWRITE_PROMPT : wxOPEN;
-        wxLogDebug ("HandleAskParamString: create dialog");
-        wxFileDialog *fdialog = new wxFileDialog (this, msg, "", wxString(param->getptr ()), "*.*", style);
-        wxLogDebug ("HandleAskParamString: before showmodal");
+        wxLogDebug (wxT("HandleAskParamString: create dialog"));
+        wxFileDialog *fdialog = new wxFileDialog (this, wxString(msg, wxConvUTF8), wxT(""), wxString(param->getptr (), wxConvUTF8), wxT("*.*"), style);
+        wxLogDebug (wxT("HandleAskParamString: before showmodal"));
         if (fdialog->ShowModal() == wxID_OK)
-          newval = (char *)fdialog->GetPath().c_str ();
-        wxLogDebug ("HandleAskParamString: after showmodal");
+          newval = fdialog->GetPath().mb_str(wxConvUTF8);
+        wxLogDebug (wxT("HandleAskParamString: after showmodal"));
         dialog = fdialog; // so I can delete it
   } else {
     // use simple string dialog
         long style = wxOK|wxCANCEL;
-        wxTextEntryDialog *tdialog = new wxTextEntryDialog (this, msg, "Enter new value", wxString(param->getptr ()), style);
+        wxTextEntryDialog *tdialog = new wxTextEntryDialog (this, wxString(msg, wxConvUTF8), wxT("Enter new value"), wxString(param->getptr (), wxConvUTF8), style);
         if (tdialog->ShowModal() == wxID_OK)
-          newval = (char *)tdialog->GetValue().c_str ();
+          newval = tdialog->GetValue().mb_str(wxConvUTF8);
         dialog = tdialog; // so I can delete it
   }
   // newval points to memory inside the dialog.  As soon as dialog is deleted,
@@ -1052,7 +1055,9 @@
   // it!
   if (newval && strlen(newval)>0) {
         // change floppy path to this value.
-        wxLogDebug ("Setting param %s to '%s'", param->get_name (), newval);
+        wxLogDebug (wxString(wxT("Setting param ")) +
+          wxString(param->get_name (), wxConvUTF8) + wxT(" to '") +
+          wxString(newval, wxConvUTF8) + wxT("'"));
         param->set (newval);
         delete dialog;
         return 1;
@@ -1087,9 +1092,9 @@
   default:
     {
           wxString msg;
-          msg.Printf ("ask param for parameter type %d is not implemented in wxWidgets",
+          msg.Printf (wxT("ask param for parameter type %d is not implemented in wxWidgets"),
                       param->get_type ());
-          wxMessageBox( msg, "not implemented", wxOK | wxICON_ERROR, this );
+          wxMessageBox( msg, wxT("not implemented"), wxOK | wxICON_ERROR, this );
           return -1;
         }
   }
@@ -1102,9 +1107,9 @@
 void 
 MyFrame::OnSim2CIEvent (wxCommandEvent& event)
 {
-  IFDBG_EVENT (wxLogDebug ("received a bochs event in the GUI thread"));
+  IFDBG_EVENT (wxLogDebug (wxT("received a bochs event in the GUI thread")));
   BxEvent *be = (BxEvent *) event.GetEventObject ();
-  IFDBG_EVENT (wxLogDebug ("event type = %d", (int) be->type));
+  IFDBG_EVENT (wxLogDebug (wxT("event type = %d"), (int) be->type));
   // all cases should return.  sync event handlers MUST send back a 
   // response.  async event handlers MUST delete the event.
   switch (be->type) {
@@ -1112,12 +1117,12 @@
     RefreshDialogs ();
     break;
   case BX_SYNC_EVT_ASK_PARAM:
-    wxLogDebug ("before HandleAskParam");
+    wxLogDebug (wxT("before HandleAskParam"));
     be->retcode = HandleAskParam (be);
-    wxLogDebug ("after HandleAskParam");
+    wxLogDebug (wxT("after HandleAskParam"));
     // return a copy of the event back to the sender.
     sim_thread->SendSyncResponse(be);
-    wxLogDebug ("after SendSyncResponse");
+    wxLogDebug (wxT("after SendSyncResponse"));
     break;
 #if BX_DEBUGGER
   case BX_ASYNC_EVT_DBG_MSG:
@@ -1131,7 +1136,7 @@
     OnLogMsg (be);
     break;
   case BX_SYNC_EVT_GET_DBG_COMMAND:
-    wxLogDebug ("BX_SYNC_EVT_GET_DBG_COMMAND received");
+    wxLogDebug (wxT("BX_SYNC_EVT_GET_DBG_COMMAND received"));
     if (debugCommand == NULL) {
       // no debugger command is ready to send, so don't send a response yet.
       // When a command is issued, MyFrame::DebugCommand will fill in the
@@ -1145,7 +1150,8 @@
       }
     } else {
       // a debugger command is waiting for us!
-      wxLogDebug ("sending debugger command '%s' that was waiting", debugCommand);
+      wxLogDebug (wxString(wxT("sending debugger command '")) +
+        wxString(debugCommand, wxConvUTF8) + wxT("' that was waiting"));
       be->u.debugcmd.command = debugCommand;
       debugCommand = NULL;  // ready for the next one
       debugCommandEvent = NULL;
@@ -1154,7 +1160,7 @@
     }
     break;
   default:
-    wxLogDebug ("OnSim2CIEvent: event type %d ignored", (int)be->type);
+    wxLogDebug (wxT("OnSim2CIEvent: event type %d ignored"), (int)be->type);
     if (!BX_EVT_IS_ASYNC(be->type)) {
       // if it's a synchronous event, and we fail to send back a response,
       // the sim thread will wait forever.  So send something!
@@ -1167,21 +1173,20 @@
 }
 
 void MyFrame::OnLogMsg (BxEvent *be) {
-  wxLogDebug ("log msg: level=%d, prefix='%s', msg='%s'",
-      be->u.logmsg.level,
-      be->u.logmsg.prefix,
-      be->u.logmsg.msg);
+  wxLogDebug (wxString(wxT("log msg: level=%d, prefix='")) +
+    wxString(be->u.logmsg.prefix, wxConvUTF8) + wxT("', msg='") +
+    wxString(be->u.logmsg.msg, wxConvUTF8) + wxT("'"), be->u.logmsg.level);
   if (be->type == BX_ASYNC_EVT_LOG_MSG)
     return;  // we don't have any place to display log messages
   else
     wxASSERT (be->type == BX_SYNC_EVT_LOG_ASK);
-  wxString levelName (SIM->get_log_level_name (be->u.logmsg.level));
+  wxString levelName (SIM->get_log_level_name (be->u.logmsg.level), wxConvUTF8);
   LogMsgAskDialog dlg (this, -1, levelName);  // panic, error, etc.
 #if !BX_DEBUGGER
   dlg.EnableButton (dlg.DEBUG, FALSE);
 #endif
-  dlg.SetContext (be->u.logmsg.prefix);
-  dlg.SetMessage (be->u.logmsg.msg);
+  dlg.SetContext (wxString(be->u.logmsg.prefix, wxConvUTF8));
+  dlg.SetMessage (wxString(be->u.logmsg.msg, wxConvUTF8));
   int n = dlg.ShowModal ();
   // turn the return value into the constant that logfunctions::ask is
   // expecting.  0=continue, 1=continue but ignore future messages from this
@@ -1190,7 +1195,7 @@
     if (dlg.GetDontAsk ()) n = BX_LOG_ASK_CHOICE_CONTINUE_ALWAYS; 
   }
   be->retcode = n;
-  wxLogDebug ("you chose %d", n);
+  wxLogDebug (wxT("you chose %d"), n);
   // This can be called from two different contexts:
   // 1) before sim_thread starts, the default application callback can
   //    call OnLogMsg to display messages.
@@ -1210,34 +1215,34 @@
 void MyFrame::editFloppyConfig (int drive)
 {
   FloppyConfigDialog dlg (this, -1);
-  dlg.SetDriveName (wxString (drive==0? BX_FLOPPY0_NAME : BX_FLOPPY1_NAME));
+  dlg.SetDriveName (wxString (drive==0? BX_FLOPPY0_NAME : BX_FLOPPY1_NAME, wxConvUTF8));
   dlg.SetCapacityChoices (n_floppy_type_names, floppy_type_names);
   bx_list_c *list = (bx_list_c*) SIM->get_param ((drive==0)? BXP_FLOPPYA : BXP_FLOPPYB);
-  if (!list) { wxLogError ("floppy object param is null"); return; }
+  if (!list) { wxLogError (wxT("floppy object param is null")); return; }
   bx_param_filename_c *fname = (bx_param_filename_c*) list->get(0);
   bx_param_enum_c *disktype = (bx_param_enum_c *) list->get(1);
   bx_param_enum_c *status = (bx_param_enum_c *) list->get(2);
   if (fname->get_type () != BXT_PARAM_STRING
       || disktype->get_type () != BXT_PARAM_ENUM 
       || status->get_type() != BXT_PARAM_ENUM) {
-    wxLogError ("floppy params have wrong type");
+    wxLogError (wxT("floppy params have wrong type"));
     return;
   }
   if (sim_thread == NULL) {
-    dlg.AddRadio ("Not Present", "");
+    dlg.AddRadio (wxT("Not Present"), wxT(""));
   }
-  dlg.AddRadio ("Ejected", "none");
+  dlg.AddRadio (wxT("Ejected"), wxT("none"));
 #if defined(__linux__)
-  dlg.AddRadio ("Physical floppy drive /dev/fd0", "/dev/fd0");
-  dlg.AddRadio ("Physical floppy drive /dev/fd1", "/dev/fd1");
+  dlg.AddRadio (wxT("Physical floppy drive /dev/fd0"), wxT("/dev/fd0"));
+  dlg.AddRadio (wxT("Physical floppy drive /dev/fd1"), wxT("/dev/fd1"));
 #elif defined(WIN32)
-  dlg.AddRadio ("Physical floppy drive A:", "A:");
-  dlg.AddRadio ("Physical floppy drive B:", "B:");
+  dlg.AddRadio (wxT("Physical floppy drive A:"), wxT("A:"));
+  dlg.AddRadio (wxT("Physical floppy drive B:"), wxT("B:"));
 #else
   // add your favorite operating system here
 #endif
   dlg.SetCapacity (disktype->get () - disktype->get_min ());
-  dlg.SetFilename (fname->getptr ());
+  dlg.SetFilename (wxString(fname->getptr (), wxConvUTF8));
   dlg.SetValidateFunc (editFloppyValidate);
   if (disktype->get() == BX_FLOPPY_NONE) {
     dlg.SetRadio(0);
@@ -1247,13 +1252,16 @@
     // otherwise the SetFilename() should have done the right thing.
   }
   int n = dlg.ShowModal ();
-  wxLogMessage ("floppy config returned %d", n);
+  wxLogMessage (wxT("floppy config returned %d"), n);
   if (n==wxID_OK) {
     char filename[1024];
     wxString fn (dlg.GetFilename ());
-    strncpy (filename, fn.c_str (), sizeof(filename));
-    wxLogMessage ("filename is '%s'", filename);
-    wxLogMessage ("capacity = %d (%s)", dlg.GetCapacity(), floppy_type_names[dlg.GetCapacity ()]);
+    strncpy (filename, fn.mb_str(wxConvUTF8), sizeof(filename));
+    filename[sizeof(filename)-1] = 0;
+    wxLogMessage (wxString(wxT("filename is '")) + fn + wxT("'"));
+    wxLogMessage (wxString(wxT("capacity = %d (")) +
+      wxString(floppy_type_names[dlg.GetCapacity ()], wxConvUTF8) + wxT(")"),
+      dlg.GetCapacity());
     fname->set (filename);
     disktype->set (disktype->get_min () + dlg.GetCapacity ());
     if (sim_thread == NULL) {
@@ -1272,12 +1280,12 @@
 {
   bx_param_c *firstcd = SIM->get_first_cdrom ();
   if (!firstcd) {
-    wxMessageBox ("No CDROM drive is enabled.  Use Edit:ATA to set one up.",
-                  "No CDROM", wxOK | wxICON_ERROR, this );
+    wxMessageBox (wxT("No CDROM drive is enabled.  Use Edit:ATA to set one up."),
+                  wxT("No CDROM"), wxOK | wxICON_ERROR, this );
     return;
   }
   ParamDialog dlg (this, -1);
-  dlg.SetTitle ("Configure CDROM");
+  dlg.SetTitle (wxT("Configure CDROM"));
   dlg.AddParam (firstcd);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.ShowModal ();
@@ -1289,7 +1297,7 @@
   int channel = id - ID_Edit_ATA0;
   ParamDialog dlg (this, -1);
   wxString str;
-  str.Printf ("Configure ATA%d", channel);
+  str.Printf (wxT("Configure ATA%d"), channel);
   dlg.SetTitle (str);
   dlg.SetRuntimeFlag (sim_thread != NULL);
   dlg.AddParam (SIM->get_param ((bx_id)(BXP_ATA0_MENU+channel)));
@@ -1298,7 +1306,7 @@
 
 void MyFrame::OnToolbarClick(wxCommandEvent& event)
 {
-  wxLogDebug ("clicked toolbar thingy");
+  wxLogDebug (wxT("clicked toolbar thingy"));
   bx_toolbar_buttons which = BX_TOOLBAR_UNDEFINED;
   int id = event.GetId ();
   switch (id) {
@@ -1323,7 +1331,7 @@
     case ID_Toolbar_Mouse_en: which = BX_TOOLBAR_MOUSE_EN; break;
     case ID_Toolbar_User: which = BX_TOOLBAR_USER; break;
     default:
-      wxLogError ("unknown toolbar id %d", id);
+      wxLogError (wxT("unknown toolbar id %d"), id);
   }
   if (num_events < MAX_EVENTS) {
     event_queue[num_events].type = BX_ASYNC_EVT_TOOLBAR;
@@ -1364,27 +1372,27 @@
   //     the -1 and calls quit_sim, which longjumps to quit_context, which is
   //     right here in SimThread::Entry.
   //   - Entry() exits and the thread stops. Whew.
-  wxLogDebug ("in SimThread, starting at bx_continue_after_config_interface");
+  wxLogDebug (wxT("in SimThread, starting at bx_continue_after_config_interface"));
   static jmp_buf context;  // this must not go out of scope. maybe static not needed
   if (setjmp (context) == 0) {
     SIM->set_quit_context (&context);
     SIM->begin_simulation (bx_startup_flags.argc, bx_startup_flags.argv);
-    wxLogDebug ("in SimThread, SIM->begin_simulation() exited normally");
+    wxLogDebug (wxT("in SimThread, SIM->begin_simulation() exited normally"));
   } else {
-    wxLogDebug ("in SimThread, SIM->begin_simulation() exited by longjmp");
+    wxLogDebug (wxT("in SimThread, SIM->begin_simulation() exited by longjmp"));
   }
   SIM->set_quit_context (NULL);
   // it is possible that the whole interface has already been shut down.
   // If so, we must end immediately.
   // we're in the sim thread, so we must get a gui mutex before calling
   // wxwidgets methods.
-  wxLogDebug ("SimThread::Entry: get gui mutex");
+  wxLogDebug (wxT("SimThread::Entry: get gui mutex"));
   wxMutexGuiEnter();
   if (!wxBochsClosing) {
-    wxLogDebug ("SimThread::Entry: sim thread ending.  call simStatusChanged");
+    wxLogDebug (wxT("SimThread::Entry: sim thread ending.  call simStatusChanged"));
     theFrame->simStatusChanged (theFrame->Stop, true);
   } else {
-    wxLogMessage ("SimThread::Entry: the gui is waiting for sim to finish.  Now that it has finished, I will close the frame.");
+    wxLogMessage (wxT("SimThread::Entry: the gui is waiting for sim to finish.  Now that it has finished, I will close the frame."));
     theFrame->Close (TRUE);
   }
   wxMutexGuiLeave();
@@ -1456,23 +1464,23 @@
   wxCommandEvent wxevent (wxEVT_COMMAND_MENU_SELECTED, ID_Sim2CI_Event);
   wxevent.SetEventObject ((wxEvent *)event);
   if (isSimThread ()) {
-    IFDBG_EVENT (wxLogDebug ("Sending an event to the window"));
+    IFDBG_EVENT (wxLogDebug (wxT("Sending an event to the window")));
     wxPostEvent (frame, wxevent);
     // if it is an asynchronous event, return immediately.  The event will be
     // freed by the recipient in the GUI thread.
     if (async) return NULL;
-    wxLogDebug ("SiminterfaceCallback2: synchronous event; waiting for response");
+    wxLogDebug (wxT("SiminterfaceCallback2: synchronous event; waiting for response"));
     // now wait forever for the GUI to post a response.
     BxEvent *response = NULL;
     while (response == NULL) {
           response = GetSyncResponse ();
           if (!response) {
-            //wxLogDebug ("no sync response yet, waiting");
+            //wxLogDebug (wxT("no sync response yet, waiting"));
             this->Sleep (20);
           }
           // don't get stuck here if the gui is trying to close.
           if (wxBochsClosing) {
-            wxLogDebug ("breaking out of sync event wait because gui is closing");
+            wxLogDebug (wxT("breaking out of sync event wait because gui is closing"));
             event->retcode = -1;
             return event;
           }
@@ -1480,7 +1488,7 @@
     wxASSERT (response != NULL);
     return response;
   } else {
-    wxLogDebug ("sim2ci event sent from the GUI thread. calling handler directly");
+    wxLogDebug (wxT("sim2ci event sent from the GUI thread. calling handler directly"));
     theFrame->OnSim2CIEvent (wxevent);
     return event;
   }
@@ -1491,7 +1499,7 @@
 {
   wxCriticalSectionLocker lock(sim2gui_mailbox_lock);
   if (sim2gui_mailbox != NULL) {
-    wxLogDebug ("WARNING: ClearSyncResponse is throwing away an event that was previously in the mailbox");
+    wxLogDebug (wxT("WARNING: ClearSyncResponse is throwing away an event that was previously in the mailbox"));
   }
   sim2gui_mailbox = NULL;
 }
@@ -1501,7 +1509,7 @@
 {
   wxCriticalSectionLocker lock(sim2gui_mailbox_lock);
   if (sim2gui_mailbox != NULL) {
-    wxLogDebug ("WARNING: SendSyncResponse is throwing away an event that was previously in the mailbox");
+    wxLogDebug (wxT("WARNING: SendSyncResponse is throwing away an event that was previously in the mailbox"));
   }
   sim2gui_mailbox = event;
 }
@@ -1522,7 +1530,7 @@
 safeWxStrcpy (char *dest, wxString src, int destlen)
 {
   wxString tmp (src);
-  strncpy (dest, tmp.c_str (), destlen);
+  strncpy (dest, tmp.mb_str(wxConvUTF8), destlen);
   dest[destlen-1] = 0;
 }
 
--- bochs-2.2.6/gui/wxmain.h.wx26	2005-11-24 19:51:55.000000000 +0100
+++ bochs-2.2.6/gui/wxmain.h	2006-02-16 19:02:56.000000000 +0100
@@ -135,7 +135,7 @@
   bx_bool fillBxKeyEvent_MSW (wxKeyEvent& event, BxKeyEvent& bxev, bx_bool release);
   bx_bool fillBxKeyEvent_GTK (wxKeyEvent& event, BxKeyEvent& bxev, bx_bool release);
 public:
-  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "panel");
+  MyPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
   ~MyPanel();
   void OnKeyDown(wxKeyEvent& event);
   void OnKeyUp(wxKeyEvent& event);
--- bochs-2.2.6/gui/siminterface.h.wx26	2006-01-18 19:35:37.000000000 +0100
+++ bochs-2.2.6/gui/siminterface.h	2006-02-16 19:02:56.000000000 +0100
@@ -1100,7 +1100,7 @@
 #endif
 };
 
-typedef char* (*param_string_event_handler)(class bx_param_string_c *, int set, char *val, int maxlen);
+typedef const char* (*param_string_event_handler)(class bx_param_string_c *, int set, const char *val, int maxlen);
 
 class BOCHSAPI bx_param_string_c : public bx_param_c {
   int maxsize;
@@ -1129,7 +1129,7 @@
   virtual void set_enabled (int enabled);
   Bit32s get (char *buf, int len);
   char *getptr () {return val; }
-  void set (char *buf);
+  void set (const char *buf);
   bx_bool equals (const char *buf);
   bx_param_num_c *get_options () { return options; }
   void set_separator (char sep) {separator = sep; }
@@ -1439,8 +1439,8 @@
   virtual int get_exit_code () { return 0; }
 
   virtual int get_default_rc (char *path, int len) {return -1;}
-  virtual int read_rc (char *path) {return -1;}
-  virtual int write_rc (char *rc, int overwrite) {return -1;}
+  virtual int read_rc (const char *path) {return -1;}
+  virtual int write_rc (const char *rc, int overwrite) {return -1;}
   virtual int get_log_file (char *path, int len) {return -1;}
   virtual int set_log_file (char *path) {return -1;}
   virtual int get_log_prefix (char *prefix, int len) {return -1;}
--- bochs-2.2.6/gui/siminterface.cc.wx26	2005-11-20 18:22:43.000000000 +0100
+++ bochs-2.2.6/gui/siminterface.cc	2006-02-16 19:02:56.000000000 +0100
@@ -72,8 +72,8 @@
   virtual void quit_sim (int code);
   virtual int get_exit_code () { return exit_code; }
   virtual int get_default_rc (char *path, int len);
-  virtual int read_rc (char *path);
-  virtual int write_rc (char *path, int overwrite);
+  virtual int read_rc (const char *path);
+  virtual int write_rc (const char *path, int overwrite);
   virtual int get_log_file (char *path, int len);
   virtual int set_log_file (char *path);
   virtual int get_log_prefix (char *prefix, int len);
@@ -352,7 +352,7 @@
 }
 
 int 
-bx_real_sim_c::read_rc (char *rc)
+bx_real_sim_c::read_rc (const char *rc)
 {
   return bx_read_configuration (rc);
 }
@@ -362,7 +362,7 @@
 //  -1: failed
 //  -2: already exists, and overwrite was off
 int 
-bx_real_sim_c::write_rc (char *rc, int overwrite)
+bx_real_sim_c::write_rc (const char *rc, int overwrite)
 {
   return bx_write_configuration (rc, overwrite);
 }
@@ -1289,12 +1289,14 @@
 }
 
 void 
-bx_param_string_c::set (char *buf)
+bx_param_string_c::set (const char *buf)
 {
   if (options->get () & RAW_BYTES)
     memcpy (val, buf, maxsize);
-  else
+  else {
     strncpy (val, buf, maxsize);
+    val[maxsize - 1] = 0;
+  }
   if (handler) {
     // the handler can return a different char* to be copied into the value
     buf = (*handler)(this, 1, buf, -1);
--- bochs-2.2.6/bochs.h.wx26	2006-01-28 17:16:02.000000000 +0100
+++ bochs-2.2.6/bochs.h	2006-02-16 19:02:56.000000000 +0100
@@ -108,8 +108,8 @@
 int bx_begin_simulation (int argc, char *argv[]);
 char *bx_find_bochsrc (void);
 int bx_parse_cmdline (int arg, int argc, char *argv[]);
-int bx_read_configuration (char *rcfile);
-int bx_write_configuration (char *rcfile, int overwrite);
+int bx_read_configuration (const char *rcfile);
+int bx_write_configuration (const char *rcfile, int overwrite);
 void bx_reset_options (void);
 Bit32u crc32(const Bit8u *buf, int len);
 
--- bochs-2.2.6/config.cc.wx26	2006-01-25 21:07:35.000000000 +0100
+++ bochs-2.2.6/config.cc	2006-02-16 19:02:56.000000000 +0100
@@ -49,9 +49,9 @@
 bx_options_t bx_options; // initialized in bx_init_options()
 
 static char *get_builtin_variable(char *varname);
-static Bit32s parse_line_unformatted(char *context, char *line);
-static Bit32s parse_line_formatted(char *context, int num_params, char *params[]);
-static int parse_bochsrc(char *rcfile);
+static Bit32s parse_line_unformatted(const char *context, char *line);
+static Bit32s parse_line_formatted(const char *context, int num_params, char *params[]);
+static int parse_bochsrc(const char *rcfile);
 static int get_floppy_type_from_image(const char *filename);
 
 static Bit64s bx_param_handler (bx_param_c *param, int set, Bit64s val)
@@ -188,7 +188,7 @@
   return val;
 }
 
-char *bx_param_string_handler (bx_param_string_c *param, int set, char *val, int maxlen)
+const char *bx_param_string_handler (bx_param_string_c *param, int set, const char *val, int maxlen)
 {
   bx_id id = param->get_id ();
 
@@ -1889,7 +1889,7 @@
   bx_options.Otext_snapshot_check->reset();
 }
 
-int bx_read_configuration (char *rcfile)
+int bx_read_configuration (const char *rcfile)
 {
   // parse rcfile first, then parse arguments in order.
   BX_INFO (("reading configuration from %s", rcfile));
@@ -1961,7 +1961,7 @@
   return strdup (rcfile);
 }
 
-static int parse_bochsrc(char *rcfile)
+static int parse_bochsrc(const char *rcfile)
 {
   FILE *fd = NULL;
   char *ret;
@@ -2032,7 +2032,7 @@
   }
 }
 
-static Bit32s parse_line_unformatted(char *context, char *line)
+static Bit32s parse_line_unformatted(const char *context, char *line)
 {
 #define MAX_PARAMS_LEN 40
   char *ptr;
@@ -2186,7 +2186,7 @@
   }
 }
 
-static Bit32s parse_log_options(char *context, char *loglev, char *param1)
+static Bit32s parse_log_options(const char *context, char *loglev, char *param1)
 {
   int level;
 
@@ -2219,7 +2219,7 @@
   return 0;
 }
 
-static Bit32s parse_line_formatted(char *context, int num_params, char *params[])
+static Bit32s parse_line_formatted(const char *context, int num_params, char *params[])
 {
   int i, slot, t;
   Bit8u idx;
@@ -3560,7 +3560,7 @@
 //   0: written ok
 //  -1: failed
 //  -2: already exists, and overwrite was off
-int bx_write_configuration (char *rc, int overwrite)
+int bx_write_configuration (const char *rc, int overwrite)
 {
   int i;