Index: cmdcolor.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 cmdcolor.cpp
--- cmdcolor.cpp	14 Dec 2004 10:06:14 -0000	1.5.2.5
+++ cmdcolor.cpp	14 Dec 2004 10:36:17 -0000
@@ -10,10 +10,10 @@
 	CListe::Iterator it;
 	l = PyList_New(edc.count());
 	for (it = edc.begin(); it != edc.end(); ++it)
-		{
+	{
 		PyList_SetItem(l, cc, PyString_FromString(it.key().utf8()));
 		cc++;
-		}
+	}
 	return l;
 }
 
Index: cmddialog.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp,v
retrieving revision 1.12.2.10
diff -u -r1.12.2.10 cmddialog.cpp
--- cmddialog.cpp	14 Dec 2004 10:06:14 -0000	1.12.2.10
+++ cmddialog.cpp	14 Dec 2004 10:36:17 -0000
@@ -22,28 +22,33 @@
 	int haspreview = 0;
 	int issave = 0;
 	char* kwargs[] = {"caption", "filter", "defaultname", "haspreview", "issave", NULL};
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "s|ssii", kwargs, &caption, &filter, &defName, &haspreview, &issave))
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "es|esesii", kwargs,
+									 "utf-8", &caption, "utf-8", &filter, "utf-8", &defName,
+									 &haspreview, &issave))
 		return NULL;
 	QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
-	QString fName = Carrier->CFileDialog(".", caption, filter, defName, static_cast<bool>(haspreview), static_cast<bool>(issave), 0, 0);
+	QString fName = Carrier->CFileDialog(".", QString::fromUtf8(caption), QString::fromUtf8(filter),
+										 QString::fromUtf8(defName), static_cast<bool>(haspreview),
+										 static_cast<bool>(issave), 0, 0);
 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+	// FIXME: filename return unicode OK?
 	return PyString_FromString(fName.utf8());
 }
 
 PyObject *scribus_messdia(PyObject *self, PyObject* args, PyObject* kw)
 {
-	char *caption = "";
-	char *message = "";
+	char *caption = NULL;
+	char *message = NULL;
 	uint result;
 	QMessageBox::Icon ico = QMessageBox::NoIcon;
 	int butt1 = QMessageBox::Ok|QMessageBox::Default;
 	int butt2 = QMessageBox::NoButton;
 	int butt3 = QMessageBox::NoButton;
 	char* kwargs[] = {"caption", "message", "icon", "button1", "button2", "button3", NULL};
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "ss|iiii", kwargs, &caption, &message, &ico, &butt1, &butt2, &butt3))
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "eses|iiii", kwargs, "utf-8", &caption, "utf-8", &message, &ico, &butt1, &butt2, &butt3))
 		return NULL;
 	QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
-	QMessageBox mb(caption, message, ico, butt1, butt2, butt3, Carrier);
+	QMessageBox mb(QString::fromUtf8(caption), QString::fromUtf8(message), ico, butt1, butt2, butt3, Carrier);
 	result = mb.exec();
 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	return PyInt_FromLong(static_cast<long>(result));
@@ -51,16 +56,16 @@
 
 PyObject *scribus_valdialog(PyObject *self, PyObject* args)
 {
-	char *caption = "";
-	char *message = "";
+	char *caption = NULL;
+	char *message = NULL;
 	char *value = "";
-	if (!PyArg_ParseTuple(args, "ss|s", &caption, &message, &value))
+	if (!PyArg_ParseTuple(args, "eses|es", "utf-8", &caption, "utf-8", &message, "utf-8", &value))
 		return NULL;
 	QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
 	ValueDialog *d = new ValueDialog(Carrier, "d", TRUE, 0);
-	d->dialogLabel->setText(message);
-	d->valueEdit->setText(value);
-	d->setCaption(caption);
+	d->dialogLabel->setText(QString::fromUtf8(message));
+	d->valueEdit->setText(QString::fromUtf8(value));
+	d->setCaption(QString::fromUtf8(caption));
 	d->exec();
 	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 	return PyString_FromString(d->valueEdit->text().utf8());
Index: cmddoc.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp,v
retrieving revision 1.9.2.10
diff -u -r1.9.2.10 cmddoc.cpp
--- cmddoc.cpp	14 Dec 2004 10:06:14 -0000	1.9.2.10
+++ cmddoc.cpp	14 Dec 2004 10:36:17 -0000
@@ -65,9 +65,9 @@
 PyObject *scribus_opendoc(PyObject *self, PyObject* args)
 {
 	char *Name;
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
-	bool ret = Carrier->LadeDoc(QString(Name));
+	bool ret = Carrier->LadeDoc(QString::fromUtf8(Name));
 	if (!ret)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to open document","python error"));
@@ -89,11 +89,11 @@
 PyObject *scribus_savedocas(PyObject *self, PyObject* args)
 {
 	char *Name;
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	bool ret = Carrier->DoFileSave(QString(Name));
+	bool ret = Carrier->DoFileSave(QString::fromUtf8(Name));
 	if (!ret)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to save document","python error"));
@@ -108,13 +108,15 @@
 	char *Author;
 	char *Title;
 	char *Desc;
+	// z means string, but None becomes a NULL value. QString()
+	// will correctly handle NULL.
 	if (!PyArg_ParseTuple(args, "zzz", &Author, &Title, &Desc))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	Carrier->doc->DocAutor = QString(Author);
-	Carrier->doc->DocTitel = QString(Title);
-	Carrier->doc->DocComments = QString(Desc);
+	Carrier->doc->DocAutor = QString::fromUtf8(Author);
+	Carrier->doc->DocTitel = QString::fromUtf8(Title);
+	Carrier->doc->DocComments = QString::fromUtf8(Desc);
 	Carrier->slotDocCh();
 	Py_INCREF(Py_None);
 	return Py_None;
@@ -147,11 +149,11 @@
 PyObject *scribus_loadstylesfromfile(PyObject *self, PyObject *args)
 {
 	char *fileName;
-	if (!PyArg_ParseTuple(args, "s", &fileName))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &fileName))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	Carrier->doc->loadStylesFromFile(QString(fileName));
+	Carrier->doc->loadStylesFromFile(QString::fromUtf8(fileName));
 	Py_INCREF(Py_None);
 	return Py_None;
 }
Index: cmdgetprop.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp,v
retrieving revision 1.8.2.9
diff -u -r1.8.2.9 cmdgetprop.cpp
--- cmdgetprop.cpp	14 Dec 2004 10:06:14 -0000	1.8.2.9
+++ cmdgetprop.cpp	14 Dec 2004 10:36:17 -0000
@@ -3,24 +3,24 @@
 
 PyObject *scribus_getfillcolor(PyObject *self, PyObject* args)
 {
-	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	char *Name = NULL;
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
-	return i != NULL ? PyString_FromString(i->Pcolor) : NULL;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != NULL ? PyString_FromString(i->Pcolor.utf8()) : NULL;
 }
 
 PyObject *scribus_getlinecolor(PyObject *self, PyObject* args)
 {
 	char *Name = "";
 	PageItem *it;
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	it = GetUniqueItem(QString(Name));
+	it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->HasSel) && ((it->PType == FRAME_TEXT) || (it->PType == FRAME_PATHTEXT)))
@@ -28,22 +28,21 @@
 		for (uint b = 0; b < it->Ptext.count(); ++b)
 		{
 			if (it->Ptext.at(b)->cselect)
-				return PyString_FromString(it->Ptext.at(b)->ccolor);
+				return PyString_FromString(it->Ptext.at(b)->ccolor.utf8());
 		}
 	}
 	else
-		return PyString_FromString(it->Pcolor2);
-	return PyString_FromString("");
+		return PyString_FromString(it->Pcolor2.utf8());
 }
 
 PyObject *scribus_getlinewidth(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->Pwidth)) : NULL;
 }
 
@@ -51,11 +50,11 @@
 {
 	char *Name = "";
 	PageItem *it;
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	it = GetUniqueItem(QString(Name));
+	it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->HasSel) && ((it->PType == FRAME_TEXT) || (it->PType == FRAME_PATHTEXT)))
@@ -74,110 +73,110 @@
 PyObject *scribus_getlinejoin(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineJoin)) : NULL;
 }
 
 PyObject *scribus_getlineend(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineEnd)) : NULL;
 }
 
 PyObject *scribus_getlinestyle(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineArt)) : NULL;
 }
 
 PyObject *scribus_getfillshade(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyInt_FromLong(static_cast<long>(i->Shade)) : NULL;
 }
 
 PyObject *scribus_getcornerrad(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyInt_FromLong(static_cast<long>(i->RadRect)) : NULL;
 }
 
 PyObject *scribus_getimgscale(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? Py_BuildValue("(ff)", i->LocalScX, i->LocalScY) : NULL;
 }
 
 PyObject *scribus_getimgname(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
-	return i != NULL ? PyString_FromString(i->Pfile) : NULL;
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
+	return i != NULL ? PyString_FromString(i->Pfile.utf8()) : NULL;
 }
 
 PyObject *scribus_getposi(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Xpos), PointToValue(i->Ypos)) : NULL;
 }
 
 PyObject *scribus_getsize(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Width), PointToValue(i->Height)) : NULL;
 }
 
 PyObject *scribus_getrotation(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->Rot * -1)) : NULL;
 }
 
@@ -210,12 +209,12 @@
 		{
 			if (Carrier->doc->Items.at(lam)->PType == typ)
 			{
-				PyList_SetItem(l, counter2, PyString_FromString(Carrier->doc->Items.at(lam)->AnName));
+				PyList_SetItem(l, counter2, PyString_FromString(Carrier->doc->Items.at(lam)->AnName.utf8()));
 				counter2++;
 			}
 		}
 		else
-			PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Items.at(lam)->AnName));
+			PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Items.at(lam)->AnName.utf8()));
 	}
 	return l;
 }
Index: cmdmani.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp,v
retrieving revision 1.7.2.10
diff -u -r1.7.2.10 cmdmani.cpp
--- cmdmani.cpp	14 Dec 2004 10:06:14 -0000	1.7.2.10
+++ cmdmani.cpp	14 Dec 2004 10:36:17 -0000
@@ -5,11 +5,11 @@
 {
 	char *Name = "";
 	char *Image;
-	if (!PyArg_ParseTuple(args, "s|s", &Image, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Image, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	if (item->PType != FRAME_IMAGE)
@@ -17,20 +17,21 @@
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Target is not an image frame.","python error"));
 		return NULL;
 	}
-	Carrier->view->LoadPict(QString(Image), item->ItemNr);
+	Carrier->view->LoadPict(QString::fromUtf8(Image), item->ItemNr);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
 
 PyObject *scribus_scaleimage(PyObject *self, PyObject* args)
 {
+	// FIXME: This function doesn't seem to work...
 	char *Name = "";
 	double x, y;
-	if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name))
+	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(Name);
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	if (item->PType != FRAME_IMAGE)
@@ -48,11 +49,11 @@
 {
 	char *Name = "";
 	double x, y;
-	if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name))
+	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item==NULL)
 		return NULL;
 	if (Carrier->view->GroupSel)
@@ -67,11 +68,11 @@
 {
 	char *Name = "";
 	double x, y;
-	if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name))
+	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	if (Carrier->view->GroupSel)
@@ -95,11 +96,11 @@
 {
 	char *Name = "";
 	double x;
-	if (!PyArg_ParseTuple(args, "d|s", &x, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &x, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	Carrier->view->RotateItem(item->Rot - x, item->ItemNr);
@@ -111,11 +112,11 @@
 {
 	char *Name = "";
 	double x;
-	if (!PyArg_ParseTuple(args, "d|s", &x, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &x, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	Carrier->view->RotateItem(x * -1.0, item->ItemNr);
@@ -127,11 +128,11 @@
 {
 	char *Name = "";
 	double x, y;
-	if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name))
+	if (!PyArg_ParseTuple(args, "dd|es", &x, &y, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(Name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
 	Carrier->view->SizeItem(ValueToPoint(x) - item->Xpos, ValueToPoint(y) - item->Ypos, item->ItemNr);
@@ -158,8 +159,11 @@
 		}
 		for (int i = 0; i < len; i++)
 		{
+			// FIXME: We might need to explicitly get this string as utf8
+			// but as sysdefaultencoding is utf8 it should be a no-op to do
+			// so anyway.
 			Name = PyString_AsString(PyList_GetItem(il, i));
-			PageItem *ic = GetUniqueItem(QString(Name));
+			PageItem *ic = GetUniqueItem(QString::fromUtf8(Name));
 			if (ic == NULL)
 				return NULL;
 			Carrier->view->SelectItemNr(ic->ItemNr);
@@ -178,11 +182,11 @@
 PyObject *scribus_ungroupobj(PyObject *self, PyObject* args)
 {
 	char *Name = "";;
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	Carrier->UnGroupObj();
@@ -194,7 +198,7 @@
 {
 	char *Name = "";
 	double sc;
-	if (!PyArg_ParseTuple(args, "d|s", &sc, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &sc, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -203,7 +207,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't scale by 0%","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	Carrier->view->Deselect();
@@ -224,8 +228,9 @@
 	if(!checkHaveDocument())
 		return NULL;
 	if ((i < static_cast<int>(Carrier->view->SelItem.count())) && (i > -1))
-		return PyString_FromString(Carrier->view->SelItem.at(i)->AnName);
+		return PyString_FromString(Carrier->view->SelItem.at(i)->AnName.utf8());
 	else
+		// FIXME: Should probably return None if no selection?
 		return PyString_FromString("");
 }
 
@@ -239,11 +244,11 @@
 PyObject *scribus_selectobj(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	Carrier->view->SelectItemNr(i->ItemNr);
@@ -263,11 +268,11 @@
 PyObject *scribus_lockobject(PyObject *self, PyObject* args)
 {
 	char *name = "";
-	if (!PyArg_ParseTuple(args, "|s", &name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == NULL)
 		return NULL;
 	item->Locked = !item->Locked;
@@ -279,13 +284,13 @@
 PyObject *scribus_islocked(PyObject *self, PyObject* args)
 {
 	char *name = "";
-	if (!PyArg_ParseTuple(args, "|s", &name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return NULL;
 	// FIXME: Rather than toggling the lock, we should probably let the user set the lock state
 	// and instead provide a different function like toggleLock()
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(name);
+	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == NULL)
 		return NULL;
 	if (item->Locked)
Index: cmdmisc.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp,v
retrieving revision 1.12.2.12
diff -u -r1.12.2.12 cmdmisc.cpp
--- cmdmisc.cpp	14 Dec 2004 10:06:14 -0000	1.12.2.12
+++ cmdmisc.cpp	14 Dec 2004 10:36:17 -0000
@@ -31,7 +31,7 @@
 	{
 		if (it.current()->UseFont)
 		{
-			PyList_SetItem(l, cc, PyString_FromString(it.currentKey()));
+			PyList_SetItem(l, cc, PyString_FromString(it.currentKey().utf8()));
 			cc++;
 		}
 	}
@@ -47,14 +47,14 @@
 	for ( ; it.current() ; ++it)
 	{
 		row = Py_BuildValue((char*)"(sssiis)",
-		                    it.currentKey().ascii(),// it.currentKey().length(),
-		                    it.current()->Family.ascii(),
-		                    it.current()->RealName().ascii(),
+		                    it.currentKey().utf8(),
+		                    it.current()->Family.utf8(),
+		                    it.current()->RealName().utf8(),
 		                    it.current()->Subset,
 		                    it.current()->EmbedPS,
-		                    it.current()->Datei.ascii()//, it.current()->Datei.length()
+		                    it.current()->Datei.utf8()
 		                   );
-		PyList_SetItem(l, cc, row);//PyString_FromString(it.currentKey()));
+		PyList_SetItem(l, cc, row);
 		cc++;
 	} // for
 	return l;
@@ -67,27 +67,27 @@
 	char *Sample = "";
 	int Size;
 	bool ret = false;
-	if (!PyArg_ParseTuple(args, "sssi", &Name, &FileName, &Sample, &Size))
+	if (!PyArg_ParseTuple(args, "esesesi", "utf-8", &Name, "utf-8", &FileName, "utf-8", &Sample, &Size))
 		return NULL;
-	if (!Carrier->Prefs.AvailFonts.find(QString(Name)))
+	if (!Carrier->Prefs.AvailFonts.find(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Font not found","python error"));
 		return NULL;
 	}
-	QString ts = QString(Sample);
+	QString ts = QString::fromUtf8(Sample);
 	if (ts == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't render an empty sample","python error"));
 		return NULL;
 	}
-	if (QString(FileName) == "")
+	if (QString::fromUtf8(FileName) == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't save to a blank filename","python error"));
 		return NULL;
 	}
-	QString da = Carrier->Prefs.AvailFonts[QString(Name)]->Datei;
+	QString da = Carrier->Prefs.AvailFonts[QString::fromUtf8(Name)]->Datei;
 	QPixmap pm = FontSample(da, Size, ts, Qt::white);
-	ret = pm.save(QString(FileName), "PPM");
+	ret = pm.save(QString::fromUtf8(FileName), "PPM");
 	// FIXME: we should probably return None on success and throw an exception on failure
 	// rather than returning an error code here.
 	return PyInt_FromLong(static_cast<long>(ret));
@@ -100,18 +100,18 @@
 	PyObject *l;
 	l = PyList_New(Carrier->doc->Layers.count());
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); lam++)
-		PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Layers[lam].Name));
+		PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Layers[lam].Name.utf8()));
 	return l;
 }
 
 PyObject *scribus_setactlayer(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, "") == 0)
+	if (Name == 0)
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
@@ -120,7 +120,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			i = static_cast<int>(lam);
 			Carrier->doc->ActiveLayer = i;
@@ -142,23 +142,23 @@
 {
 	if(!checkHaveDocument())
 		return NULL;
-	return PyString_FromString(Carrier->doc->Layers[Carrier->doc->ActiveLayer].Name);
+	return PyString_FromString(Carrier->doc->Layers[Carrier->doc->ActiveLayer].Name.utf8());
 }
 
 PyObject *scribus_senttolayer(PyObject *self, PyObject* args)
 {
 	char *Name = "";
 	char *Layer = "";
-	if (!PyArg_ParseTuple(args, "s|s", &Layer, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Layer, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Layer, "") == 0)
+	if (Layer == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	Carrier->view->SelectItemNr(i->ItemNr);
@@ -167,7 +167,7 @@
 	{
 		Carrier->view->SelectItemNr(i->ItemNr);
 		for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
-			if (Carrier->doc->Layers[lam].Name == QString(Layer))
+			if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Layer))
 			{
 				i->LayerNr = static_cast<int>(lam);
 				found = true;
@@ -188,7 +188,7 @@
 {
 	char *Name = "";
 	int vis = 1;
-	if (!PyArg_ParseTuple(args, "si", &Name, &vis))
+	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -200,7 +200,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			Carrier->doc->Layers[lam].Sichtbar = vis;
 			found = true;
@@ -220,11 +220,11 @@
 {
 	char *Name = "";
 	int vis = 1;
-	if (!PyArg_ParseTuple(args, "si", &Name, &vis))
+	if (!PyArg_ParseTuple(args, "esi", "utf-8", &Name, &vis))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, "") == 0)
+	if (Name == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
@@ -232,7 +232,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			Carrier->doc->Layers[lam].Drucken = vis;
 			found = true;
@@ -251,11 +251,11 @@
 PyObject *scribus_glayervisib(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, "") == 0)
+	if (Name == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
@@ -264,7 +264,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); lam++)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			i = static_cast<int>(Carrier->doc->Layers[lam].Sichtbar);
 			found = true;
@@ -282,11 +282,11 @@
 PyObject *scribus_glayerprint(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, "") == 0)
+	if (Name == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
@@ -295,7 +295,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			i = static_cast<int>(Carrier->doc->Layers[lam].Drucken);
 			found = true;
@@ -313,11 +313,11 @@
 PyObject *scribus_removelayer(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, ""))
+	if (Name == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't have an empty layer name","python error"));
 		return NULL;
@@ -330,7 +330,7 @@
 	bool found = false;
 	for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam)
 	{
-		if (Carrier->doc->Layers[lam].Name == QString(Name))
+		if (Carrier->doc->Layers[lam].Name == QString::fromUtf8(Name))
 		{
 			QValueList<Layer>::iterator it2 = Carrier->doc->Layers.at(lam);
 			int num2 = (*it2).LNr;
@@ -368,11 +368,11 @@
 PyObject *scribus_createlayer(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (strcmp(Name, "") == 0)
+	if (Name == "")
 	{
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Can't create layer without a name","python error"));
 		return NULL;
@@ -382,7 +382,7 @@
 	ll.LNr = Carrier->doc->Layers.last().LNr + 1;
 	ll.Level = Carrier->doc->Layers.count();
 	// FIXME: what if the name exists?
-	ll.Name = QString(Name);
+	ll.Name = QString::fromUtf8(Name);
 	ll.Sichtbar = true;
 	ll.Drucken = true;
 	Carrier->doc->Layers.append(ll);
@@ -394,6 +394,6 @@
 
 PyObject *scribus_getlanguage(PyObject *self)
 {
-	return PyString_FromString(Carrier->getGuiLanguage());
+	return PyString_FromString(Carrier->getGuiLanguage().utf8());
 }
 
Index: cmdobj.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp,v
retrieving revision 1.11.2.12
diff -u -r1.11.2.12 cmdobj.cpp
--- cmdobj.cpp	14 Dec 2004 10:06:14 -0000	1.11.2.12
+++ cmdobj.cpp	14 Dec 2004 10:36:17 -0000
@@ -6,12 +6,12 @@
 PyObject *scribus_newrect(PyObject *self, PyObject* args)
 {
 	double x, y, b, h;
-	char *Name = "";
-	if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name))
+	char *Name = NULL;
+	if (!PyArg_ParseTuple(args, "dddd|es", &x, &y, &b, &h, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
@@ -21,8 +21,8 @@
 															Carrier->doc->Dwidth, Carrier->doc->Dbrush, Carrier->doc->Dpen);
 	Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
 	if (Name != "")
-		Carrier->doc->Items.at(i)->AnName = QString(Name);
-	return PyString_FromString(Carrier->doc->Items.at(i)->AnName);
+		Carrier->doc->Items.at(i)->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
 }
 
 
@@ -30,20 +30,20 @@
 {
 	double x, y, b, h;
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name))
+	if (!PyArg_ParseTuple(args, "dddd|es", &x, &y, &b, &h, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	int i = Carrier->view->PaintEllipse(ValueToPoint(x), ValueToPoint(y), ValueToPoint(b), ValueToPoint(h), Carrier->doc->Dwidth, Carrier->doc->Dbrush, Carrier->doc->Dpen);
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
 	}
 	Carrier->view->SetOvalFrame(Carrier->doc->Items.at(i));
 	if (Name != "")
-		Carrier->doc->Items.at(i)->AnName = QString(Name);
-	return PyString_FromString(Carrier->doc->Items.at(i)->AnName);
+		Carrier->doc->Items.at(i)->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
 }
 
 
@@ -51,20 +51,20 @@
 {
 	double x, y, b, h;
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name))
+	if (!PyArg_ParseTuple(args, "dddd|es", &x, &y, &b, &h, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	int i = Carrier->view->PaintPict(ValueToPoint(x), ValueToPoint(y), ValueToPoint(b), ValueToPoint(h));
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
 	}
 	Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
 	if (Name != "")
-		Carrier->doc->Items.at(i)->AnName = QString(Name);
-	return PyString_FromString(Carrier->doc->Items.at(i)->AnName);
+		Carrier->doc->Items.at(i)->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
 }
 
 
@@ -72,20 +72,20 @@
 {
 	double x, y, b, h;
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name))
+	if (!PyArg_ParseTuple(args, "dddd|es", &x, &y, &b, &h, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	int i = Carrier->view->PaintText(ValueToPoint(x), ValueToPoint(y), ValueToPoint(b), ValueToPoint(h), Carrier->doc->Dwidth, Carrier->doc->DpenText);
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
 	}
 	Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
 	if (Name != "")
-		Carrier->doc->Items.at(i)->AnName = QString(Name);
-	return PyString_FromString(Carrier->doc->Items.at(i)->AnName);
+		Carrier->doc->Items.at(i)->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
 }
 
 
@@ -93,14 +93,14 @@
 {
 	double x, y, b, h;
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name))
+	if (!PyArg_ParseTuple(args, "dddd|es", &x, &y, &b, &h, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	x =	ValueToPoint(x);
 	y = ValueToPoint(y);
 	b = ValueToPoint(b);
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
@@ -127,8 +127,8 @@
 	Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), i, false, false);
 	Carrier->view->AdjustItemSize(it);
 	if (Name != "")
-		it->AnName = QString(Name);
-	return PyString_FromString(it->AnName);
+		it->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(it->AnName.utf8());
 }
 
 
@@ -136,7 +136,8 @@
 {
 	char *Name = "";
 	PyObject *il;
-	if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il)))
+	// FIXME: PyList_Check failing will cause the function to return NULL w/o an exception. Separarate out the check.
+	if ((!PyArg_ParseTuple(args, "O|es", &il, "utf-8", &Name)) || (!PyList_Check(il)))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -151,7 +152,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Point list must contain an even number of values","python error"));
 		return NULL;
 	}
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
@@ -200,9 +201,9 @@
 	Carrier->view->AdjustItemSize(it);
 	if (Name != "")
 	{
-		it->AnName = QString(Name);
+		it->AnName = QString::fromUtf8(Name);
 	}
-	return PyString_FromString(it->AnName);
+	return PyString_FromString(it->AnName.utf8());
 }
 
 
@@ -210,7 +211,8 @@
 {
 	char *Name = "";
 	PyObject *il;
-	if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il)))
+	// FIXME: PyList_Check failing will cause the function to return NULL w/o an exception. Separarate out the check.
+	if ((!PyArg_ParseTuple(args, "O|es", &il, "utf-8", &Name)) || (!PyList_Check(il)))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -225,7 +227,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Point list must contain an even number of values","python error"));
 		return NULL;
 	}
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
@@ -278,15 +280,16 @@
 	Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false);
 	Carrier->view->AdjustItemSize(it);
 	if (Name != "")
-		it->AnName = QString(Name);
-	return PyString_FromString(it->AnName);
+		it->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(it->AnName.utf8());
 }
 
 PyObject *scribus_bezierline(PyObject *self, PyObject* args)
 {
 	char *Name = "";
 	PyObject *il;
-	if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il)))
+	// FIXME: PyList_Check failing will cause the function to return NULL w/o an exception. Separarate out the check.
+	if ((!PyArg_ParseTuple(args, "O|es", &il, "utf-8", &Name)) || (!PyList_Check(il)))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -301,7 +304,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Point list must have a multiple of six values","python error"));
 		return NULL;
 	}
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
@@ -363,8 +366,8 @@
 	Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false);
 	Carrier->view->AdjustItemSize(it);
 	if (Name != "")
-		it->AnName = QString(Name);
-	return PyString_FromString(it->AnName);
+		it->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(it->AnName.utf8());
 }
 
 
@@ -376,19 +379,19 @@
 	char *Name = "";
 	char *TextB = "";
 	char *PolyB = "";
-	if (!PyArg_ParseTuple(args, "ddss|s", &x, &y, &TextB, &PolyB, &Name))
+	if (!PyArg_ParseTuple(args, "ddeses|es", &x, &y, "utf-8", &TextB, "utf-8", &PolyB, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (ItemExists(QString(Name)))
+	if (ItemExists(QString::fromUtf8(Name)))
 	{
 		PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists","python error"));
 		return NULL;
 	}
 	//FIXME: Why use GetItem not GetUniqueItem? Maybe use GetUniqueItem and use the exceptions
 	// its sets for us?
-	int i = GetItem(QString(TextB));
-	int ii = GetItem(QString(PolyB));
+	int i = GetItem(QString::fromUtf8(TextB));
+	int ii = GetItem(QString::fromUtf8(PolyB));
 	if ((i == -1) || (ii == -1))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Object not found","python error"));
@@ -401,8 +404,8 @@
 	Carrier->view->ToPathText();
 	Carrier->view->MoveItem(ValueToPoint(x) - it->Xpos, ValueToPoint(y) - it->Ypos, it);
 	if (Name != "")
-		it->AnName = QString(Name);
-	return PyString_FromString(it->AnName);
+		it->AnName = QString::fromUtf8(Name);
+	return PyString_FromString(it->AnName.utf8());
 }
 
 
@@ -411,11 +414,11 @@
 PyObject *scribus_deleteobj(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	Carrier->view->SelItem.clear();
@@ -433,11 +436,11 @@
 	char *name = "";
 	int state = -1;
 
-	if (!PyArg_ParseTuple(args, "s|i", &name, &state))
+	if (!PyArg_ParseTuple(args, "es|i", "utf-8", &name, &state))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(name));
 	if (i == NULL)
 		return NULL;
 	if (state == -1)
@@ -454,11 +457,11 @@
 PyObject *scribus_objectexists(PyObject *self, PyObject* args)
 {
 	char* name = "";
-	if (!PyArg_ParseTuple(args, "|s", &name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	if (ItemExists(QString(name)))
+	if (ItemExists(QString::fromUtf8(name)))
 		return PyBool_FromLong(static_cast<long>(true));
 	return PyBool_FromLong(static_cast<long>(false));
 }
@@ -470,16 +473,16 @@
  */
 PyObject *scribus_setstyle(PyObject *self, PyObject* args)
 {
-	char *Style = "";
+	char *style = "";
 	char *name = "";
-	if (!PyArg_ParseTuple(args, "s|s", &Style, &name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &style, "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == NULL)
 		return NULL;
-	if (item->PType == FRAME_TEXT)
+	if ((item->PType == FRAME_TEXT) || (item->PType == FRAME_PATHTEXT))
 	{
 		/*
 		 * First, find the style number associated with the requested style
@@ -492,7 +495,7 @@
 		// We start at zero here because it's OK to match an internal name
 		for (uint i=0; i < Carrier->doc->Vorlagen.count(); ++i)
 		{
-			if (Carrier->doc->Vorlagen[i].Vname == Style) {
+			if (Carrier->doc->Vorlagen[i].Vname == QString::fromUtf8(style)) {
 				found = true;
 				styleid = i;
 				break;
@@ -535,7 +538,7 @@
 	*/
 	for (uint i=0; i < Carrier->doc->Vorlagen.count(); ++i)
 	{
-		if (PyList_Append(styleList, PyString_FromString(Carrier->doc->Vorlagen[i].Vname)))
+		if (PyList_Append(styleList, PyString_FromString(Carrier->doc->Vorlagen[i].Vname.utf8())))
 		{
 			// An exception will have already been set by PyList_Append apparently.
 			return NULL;
Index: cmdpage.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp,v
retrieving revision 1.11.2.11
diff -u -r1.11.2.11 cmdpage.cpp
--- cmdpage.cpp	14 Dec 2004 10:06:14 -0000	1.11.2.11
+++ cmdpage.cpp	14 Dec 2004 10:36:17 -0000
@@ -20,11 +20,11 @@
 PyObject *scribus_savepageeps(PyObject *self, PyObject* args)
 {
 	char *Name;
-	if (!PyArg_ParseTuple(args, "s", &Name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	bool ret = Carrier->DoSaveAsEps(QString(Name));
+	bool ret = Carrier->DoSaveAsEps(QString::fromUtf8(Name));
 	if (!ret)
 	{
 		PyErr_SetString(ScribusException, QObject::tr("Failed to save EPS","python error"));
@@ -74,12 +74,12 @@
 {
 	int e;
 	char *name = "Normal";
-	if (!PyArg_ParseTuple(args, "i|s", &e, &name))
+	if (!PyArg_ParseTuple(args, "i|es", &e, "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	if (e < 0)
-		Carrier->slotNewPageP(Carrier->doc->Pages.count(), QString(name));
+		Carrier->slotNewPageP(Carrier->doc->Pages.count(), QString::fromUtf8(name));
 	else
 	{
 		e--;
@@ -88,7 +88,7 @@
 			PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range","python error"));
 			return NULL;
 		}
-		Carrier->slotNewPageP(e, QString(name));
+		Carrier->slotNewPageP(e, QString::fromUtf8(name));
 	}
 	Py_INCREF(Py_None);
 	return Py_None;
Index: cmdsetprop.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp,v
retrieving revision 1.8.2.9
diff -u -r1.8.2.9 cmdsetprop.cpp
--- cmdsetprop.cpp	14 Dec 2004 10:06:14 -0000	1.8.2.9
+++ cmdsetprop.cpp	14 Dec 2004 10:36:17 -0000
@@ -7,17 +7,17 @@
 	char *Color1;
 	char *Color2;
 	int typ, shade1, shade2;
-	if (!PyArg_ParseTuple(args, "isisi|s", &typ, &Color1, &shade1, &Color2, &shade2, &Name))
+	if (!PyArg_ParseTuple(args, "iesiesi|es", &typ, "utf-8", &Color1, &shade1, "utf-8", &Color2, &shade2, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *b = GetUniqueItem(QString(Name));
+	PageItem *b = GetUniqueItem(QString::fromUtf8(Name));
 	if (b == NULL)
 		return NULL;
 	QColor tmp;
 	b->fill_gradient.clearStops();
-	QString c1 = QString(Color1);
-	QString c2 = QString(Color2);
+	QString c1 = QString::fromUtf8(Color1);
+	QString c2 = QString::fromUtf8(Color2);
 	b->SetFarbe(&tmp, c1, shade1);
 	b->fill_gradient.addStop(tmp, 0.0, 0.5, 1.0, c1, shade1);
 	b->SetFarbe(&tmp, c2, shade2);
@@ -33,14 +33,14 @@
 {
 	char *Name = "";
 	char *Color;
-	if (!PyArg_ParseTuple(args, "s|s", &Color, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
-	i->Pcolor = QString(Color);
+	i->Pcolor = QString::fromUtf8(Color);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -49,14 +49,14 @@
 {
 	char *Name = "";
 	char *Color;
-	if (!PyArg_ParseTuple(args, "s|s", &Color, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
-	it->Pcolor2 = QString(Color);
+	it->Pcolor2 = QString::fromUtf8(Color);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -65,7 +65,7 @@
 {
 	char *Name = "";
 	double w;
-	if (!PyArg_ParseTuple(args, "d|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -74,7 +74,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Line width out of bounds, must be 0 <= line_width <= 12","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	i->Pwidth = w;
@@ -86,7 +86,7 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -95,7 +95,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Line shade out of bounds, must be 0 <= shade <= 100","python error"));
 		return NULL;
 	}
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	it->Shade2 = w;
@@ -107,7 +107,7 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -116,7 +116,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Fill shade out of bounds, must be 0 <= shade <= 100","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	i->Shade = w;
@@ -128,11 +128,11 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	i->PLineJoin = Qt::PenJoinStyle(w);
@@ -144,11 +144,11 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	i->PLineEnd = Qt::PenCapStyle(w);
@@ -160,11 +160,11 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	i->PLineArt = Qt::PenStyle(w);
@@ -176,7 +176,7 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -185,10 +185,11 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Corner radius must be a positive number.","python error"));
 		return NULL;
 	}
-	PageItem *b = GetUniqueItem(QString(Name));
+	PageItem *b = GetUniqueItem(QString::fromUtf8(Name));
 	if (b == NULL)
 		return NULL;
 	// What the heck is a type 3 frame?
+	// FIXME: Doesn't seem to work, at least on rect/polygon frames
 	if ((b->PType == FRAME_IMAGE) || (b->PType == 3) || (b->PType == FRAME_TEXT))
 	{
 		if ((b->PType == 2) || (b->PType == 3) || (b->PType == 4))
@@ -210,19 +211,19 @@
 {
 	char *Name = "";
 	char *Style = NULL;
-	if (!PyArg_ParseTuple(args, "s|s", &Style, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Style, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *b = GetUniqueItem(QString(Name));
+	PageItem *b = GetUniqueItem(QString::fromUtf8(Name));
 	if (b == NULL)
 		return NULL;
-	if (!Carrier->doc->MLineStyles.contains(QString(Style)))
+	if (!Carrier->doc->MLineStyles.contains(QString::fromUtf8(Style)))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Line style not found","python error"));
 		return NULL;
 	}
-	b->NamedLStyle = QString(Style);
+	b->NamedLStyle = QString::fromUtf8(Style);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
Index: cmdtext.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp,v
retrieving revision 1.19.2.10
diff -u -r1.19.2.10 cmdtext.cpp
--- cmdtext.cpp	9 Dec 2004 16:52:52 -0000	1.19.2.10
+++ cmdtext.cpp	14 Dec 2004 10:36:17 -0000
@@ -4,11 +4,11 @@
 PyObject *scribus_getfontsize(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -29,11 +29,11 @@
 PyObject *scribus_getfont(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -45,20 +45,20 @@
 	{
 		for (uint b = 0; b < it->Ptext.count(); b++)
 			if (it->Ptext.at(b)->cselect)
-				return PyString_FromString(it->Ptext.at(b)->cfont);
+				return PyString_FromString(it->Ptext.at(b)->cfont.utf8());
 	}
 	else
-		return PyString_FromString(it->IFont);
+		return PyString_FromString(it->IFont.utf8());
 }
 
 PyObject *scribus_gettextsize(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if ((i->PType != FRAME_TEXT) && (i->PType != FRAME_PATHTEXT))
@@ -72,11 +72,11 @@
 PyObject *scribus_getcolumns(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -90,11 +90,11 @@
 PyObject *scribus_getlinespace(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -108,11 +108,11 @@
 PyObject *scribus_getcolumngap(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -126,12 +126,12 @@
 PyObject *scribus_getframetext(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	QString text = "";
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -151,18 +151,18 @@
 			text += it->Ptext.at(a)->ch;
 		}
 	}
-	return PyString_FromString(text);
+	return PyString_FromString(text.utf8());
 }
 
 PyObject *scribus_gettext(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
 	QString text = "";
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -227,18 +227,18 @@
 			}
 		} // for
 	} // while
-	return PyString_FromString(text);
+	return PyString_FromString(text.utf8());
 }
 
 PyObject *scribus_setboxtext(PyObject *self, PyObject* args)
 {
 	char *Name = "";
 	char *Text;
-	if (!PyArg_ParseTuple(args, "es|s", "utf-8", &Text, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Text, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -293,11 +293,11 @@
 	char *Name = "";
 	char *Text;
 	int pos;
-	if (!PyArg_ParseTuple(args, "esi|s", "utf-8", &Text, &pos, &Name))
+	if (!PyArg_ParseTuple(args, "esi|es", "utf-8", &Text, &pos, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -346,7 +346,7 @@
 {
 	char *Name = "";
 	int alignment;
-	if (!PyArg_ParseTuple(args, "i|s", &alignment, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &alignment, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -355,7 +355,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Alignment out of range. Use one of the scribus.ALIGN* constants.","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -379,7 +379,7 @@
 {
 	char *Name = "";
 	double size;
-	if (!PyArg_ParseTuple(args, "d|s", &size, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &size, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -388,7 +388,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Font size out of bounds - must be 1 <= size <= 512","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	
@@ -413,11 +413,11 @@
 {
 	char *Name = "";
 	char *Font = "";
-	if (!PyArg_ParseTuple(args, "s|s", &Font, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Font, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if ((i->PType != FRAME_TEXT) && (i->PType != FRAME_PATHTEXT))
@@ -425,14 +425,14 @@
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Can't set font on a non-text frame","python error"));
 		return NULL;
 	}
-	if (Carrier->Prefs.AvailFonts.find(QString(Font)))
+	if (Carrier->Prefs.AvailFonts.find(QString::fromUtf8(Font)))
 	{
 		int Apm = Carrier->doc->AppMode;
 		Carrier->view->SelItem.clear();
 		Carrier->view->SelItem.append(i);
 		if (i->HasSel)
 			Carrier->doc->AppMode = 7;
-		Carrier->SetNewFont(QString(Font));
+		Carrier->SetNewFont(QString::fromUtf8(Font));
 		Carrier->doc->AppMode = Apm;
 		Carrier->view->Deselect();
 	}
@@ -449,7 +449,7 @@
 {
 	char *Name = "";
 	double w;
-	if (!PyArg_ParseTuple(args, "d|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -458,7 +458,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Line space out of bounds, must be >= 0.1","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -475,7 +475,7 @@
 {
 	char *Name = "";
 	double w;
-	if (!PyArg_ParseTuple(args, "d|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "d|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -484,7 +484,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Column gap out of bounds, must be positive","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -501,7 +501,7 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -510,7 +510,7 @@
 		PyErr_SetString(PyExc_ValueError, QObject::tr("Column count out of bounds, must be > 1","python error"));
 		return NULL;
 	}
-	PageItem *i = GetUniqueItem(QString(Name));
+	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
 	if (i->PType != FRAME_TEXT)
@@ -527,11 +527,11 @@
 {
 	char *Name = "";
 	int start, ende;
-	if (!PyArg_ParseTuple(args, "ii|s", &start, &ende, &Name))
+	if (!PyArg_ParseTuple(args, "ii|es", &start, &ende, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((start < 0) || ((start + ende) > static_cast<int>(it->Ptext.count()-1)))
@@ -569,11 +569,11 @@
 PyObject *scribus_deletetext(PyObject *self, PyObject* args)
 {
 	char *Name = "";
-	if (!PyArg_ParseTuple(args, "|s", &Name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -596,11 +596,11 @@
 {
 	char *Name = "";
 	char *Color;
-	if (!PyArg_ParseTuple(args, "s|s", &Color, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -615,12 +615,12 @@
 			if (it->HasSel)
 			{
 				if (it->Ptext.at(b)->cselect)
-					it->Ptext.at(b)->ccolor = QString(Color);
+					it->Ptext.at(b)->ccolor = QString::fromUtf8(Color);
 			}
 			else
-				it->Ptext.at(b)->ccolor = QString(Color);
+				it->Ptext.at(b)->ccolor = QString::fromUtf8(Color);
 		}
-		it->TxtFill = QString(Color);
+		it->TxtFill = QString::fromUtf8(Color);
 	}
 	Py_INCREF(Py_None);
 	return Py_None;
@@ -630,11 +630,11 @@
 {
 	char *Name = "";
 	char *Color;
-	if (!PyArg_ParseTuple(args, "s|s", &Color, &Name))
+	if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Color, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -649,12 +649,12 @@
 			if (it->HasSel)
 			{
 				if (it->Ptext.at(b)->cselect)
-					it->Ptext.at(b)->cstroke = QString(Color);
+					it->Ptext.at(b)->cstroke = QString::fromUtf8(Color);
 			}
 			else
-				it->Ptext.at(b)->cstroke = QString(Color);
+				it->Ptext.at(b)->cstroke = QString::fromUtf8(Color);
 		}
-		it->TxtStroke = QString(Color);
+		it->TxtStroke = QString::fromUtf8(Color);
 	}
 	Py_INCREF(Py_None);
 	return Py_None;
@@ -664,7 +664,7 @@
 {
 	char *Name = "";
 	int w;
-	if (!PyArg_ParseTuple(args, "i|s", &w, &Name))
+	if (!PyArg_ParseTuple(args, "i|es", &w, "utf-8", &Name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
@@ -673,7 +673,7 @@
 		Py_INCREF(Py_None);
 		return Py_None;
 	}
-	PageItem *it = GetUniqueItem(QString(Name));
+	PageItem *it = GetUniqueItem(QString::fromUtf8(Name));
 	if (it == NULL)
 		return NULL;
 	if ((it->PType != FRAME_TEXT) && (it->PType != FRAME_PATHTEXT))
@@ -704,14 +704,14 @@
 	char *name1;
 	char *name2;
 
-	if (!PyArg_ParseTuple(args, "ss", &name1, &name2))
+	if (!PyArg_ParseTuple(args, "eses", "utf-8", &name1, "utf-8", &name2))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *fromitem = GetUniqueItem(QString(name1));
+	PageItem *fromitem = GetUniqueItem(QString::fromUtf8(name1));
 	if (fromitem == NULL)
 		return NULL;
-	PageItem *toitem = GetUniqueItem(QString(name2));
+	PageItem *toitem = GetUniqueItem(QString::fromUtf8(name2));
 	if (toitem == NULL)
 		return NULL;
 	if ((fromitem->PType != FRAME_TEXT) || (toitem->PType != FRAME_TEXT))
@@ -752,11 +752,11 @@
 PyObject *scribus_unlinktextframes(PyObject * self, PyObject* args)
 {
 	char *name;
-	if (!PyArg_ParseTuple(args, "s", &name))
+	if (!PyArg_ParseTuple(args, "es", "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(name);
+	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == NULL)
 		return NULL;
 	if (item->PType != FRAME_TEXT)
@@ -804,11 +804,11 @@
 PyObject *scribus_tracetext(PyObject *self, PyObject* args)
 {
 	char *name = "";
-	if (!PyArg_ParseTuple(args, "|s", &name))
+	if (!PyArg_ParseTuple(args, "|es", "utf-8", &name))
 		return NULL;
 	if(!checkHaveDocument())
 		return NULL;
-	PageItem *item = GetUniqueItem(QString(name));
+	PageItem *item = GetUniqueItem(QString::fromUtf8(name));
 	if (item == NULL)
 		return NULL;
 	if (item->PType != FRAME_TEXT)
Index: guiapp.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/guiapp.cpp,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 guiapp.cpp
--- guiapp.cpp	3 Dec 2004 15:05:48 -0000	1.5.2.5
+++ guiapp.cpp	14 Dec 2004 10:36:17 -0000
@@ -14,10 +14,8 @@
 	return Py_None;
 }
 
-PyObject *scribus_progressreset(PyObject *self, PyObject* args)
+PyObject *scribus_progressreset(PyObject *self)
 {
-	if (!PyArg_ParseTuple(args, ""))
-		return NULL;
 	Carrier->FProg->reset();
 	qApp->processEvents();
 	Py_INCREF(Py_None);
@@ -57,9 +55,9 @@
 {
 	char *aCursor;
 	qDebug("WARNING! SetCursor() is not stable!");
-	if (!PyArg_ParseTuple(args, "s", &aCursor))
+	if (!PyArg_ParseTuple(args, "es", "ascii", &aCursor))
 		return NULL;
-	if (aCursor=="wait")
+	if (strcmp(aCursor, "wait") == 0)
 		qApp->setOverrideCursor(Qt::WaitCursor);
 	else
 		qApp->restoreOverrideCursor();
Index: guiapp.h
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/guiapp.h,v
retrieving revision 1.2.2.4
diff -u -r1.2.2.4 guiapp.h
--- guiapp.h	14 Dec 2004 10:06:14 -0000	1.2.2.4
+++ guiapp.h	14 Dec 2004 10:36:17 -0000
@@ -32,7 +32,7 @@
 TODO: check total vs. set values.
 (Petr Vanek 02/19/04)
 */
-PyObject *scribus_progressreset(PyObject *self, PyObject* args);
+PyObject *scribus_progressreset(PyObject *self);
 
 /*! docstring */
 PyDoc_STRVAR(scribus_progresssettotalsteps__doc__,
Index: scriptplugin.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp,v
retrieving revision 1.33.2.25
diff -u -r1.33.2.25 scriptplugin.cpp
--- scriptplugin.cpp	14 Dec 2004 10:06:14 -0000	1.33.2.25
+++ scriptplugin.cpp	14 Dec 2004 10:36:18 -0000
@@ -659,7 +659,7 @@
 	{"openDoc", scribus_opendoc, METH_VARARGS, tr(scribus_opendoc__doc__)},
 	{"pageCount", (PyCFunction)scribus_pagecount, METH_NOARGS, tr(scribus_pagecount__doc__)},
 	{"pageDimension", (PyCFunction)scribus_pagedimension, METH_NOARGS, tr(scribus_pagedimension__doc__)},
-	{"progressReset", scribus_progressreset, METH_VARARGS, tr(scribus_progressreset__doc__)},
+	{"progressReset", (PyCFunction)scribus_progressreset, METH_NOARGS, tr(scribus_progressreset__doc__)},
 	{"progressSet", scribus_progresssetprogress, METH_VARARGS, tr(scribus_progresssetprogress__doc__)},
 	{"progressTotal", scribus_progresssettotalsteps, METH_VARARGS, tr(scribus_progresssettotalsteps__doc__)},
 	{"redrawAll", (PyCFunction)scribus_redraw, METH_NOARGS, tr(scribus_redraw__doc__)},
